A General Technology & Development Blog

Technology, Development, Programming – Magento, Wordpress.

Home » How to update your WordPress username and ID via phpmyadmin

How to update your WordPress username and ID via phpmyadmin

For security purposes, it is better to update your default / main admin username for WordPress from ‘admin’ to something more secure and to also update the default admin user ID from 1.

To do this, you can run the following SQL query in phpmyadmin:

UPDATE wp_users SET ID = 1024 WHERE ID = 1;

UPDATE wp_usermeta SET user_id = 1024 WHERE user_id = 1;

UPDATE wp_users SET user_login = ‘your username’ WHERE user_login = ‘admin’;

What the above query does it changes the default admin user ID from 1 to 1024 and changes the default admin username from admin to your username.

Note: replace “your username” with the username of your choice, e.g. Ben Dover.

  • Was this Helpful ?
  • Yes   No

Name of author

Name: BlogOwner

Short Bio: "The master has failed more times than the beginner has even tried."

eXTReMe Tracker