dimanche 22 mars 2015

How to change WordPress user ID?


Is this enough to change the user ID? I'm doing this for security purposes, where the administrator has user ID=1 and I want to keep all posts, pages and content.



UPDATE wp_posts SET post_author='1000' WHERE post_author='1';
UPDATE wp_users SET ID = '1000' WHERE ID = '1';
UPDATE wp_usermeta SET user_id = '1000' WHERE user_id = '1';

ALTER TABLE wp_users AUTO_INCREMENT = 1001;


Is there a WordPress function to do it globally?





Aucun commentaire:

Enregistrer un commentaire