How to Change Your WordPress Admin Username

Hi admin!

Just kidding. That’s not your name is it? Then why keep using it as your WordPress username? Not only is it boring, imagine how easy it is for hackers to guess your admin username.

Well, good news, changing your WordPress admin login username is easy. First, go to your”wp-config.php” file (in the root directory of your WordPress install) and find the name of your WordPress database. It’ll be defined in a line of code that looks like this:

1
2
3
/** The name of the database for WordPress */

define('DB_NAME', 'database_name_here');

Next, go to your Cpanel and look for your PHPMyAdmin icon. It looks like this in most hosting accounts:

Once you’ve clicked that, find your WordPress database and look for the table named “wp_users.” You’ll see your current username under the “user_login” column when you go to the “browse” view for that table. You’re probably the first entry in that table.

Click the “edit” option, change your username to whatever you want (just be sure you remember it) and click save.

Done deal.

Update: Extra Step for Changing Your WordPress Admin Username in Multisite

The above steps work fine for regular WordPress installs, but I forgot to mention that if you have a multisite network which already has  secondary sites, you’ll need to change one more thing in your WordPress multisite database. First, go to your mulsite database and look for the table “wp_sitemeta,” which contains additional information about your network user roles.

Look in the “meta_key” column and find the row which has the record “site_admins.” That same row should have have another column called “meta_value.” In the “meta_value” column you’ll see a record which looks something like this:

a:1:{i:0;s:5:”admin”;}

In your database, the word “admin” will be whatever your OLD admin username was. Simply click “edit,” and change that old username to your new one. So if your username was originally “admin” and you wanted to change it to “baddude,” you would change this…

a:1:{i:0;s:5:”admin”;}

…into this…

a:1:{i:0;s:5:”baddude”;}

Once that’s done, look at the number which comes just before your admin name. In the above example, it’s the number “5,” right there after the “s:” and just before the “:”baddude”; That number represents the number of characters in your admin username, so it needs to be changed to match the number of characters in your NEW admin username.

For example, “admin” has only 5 letters while “baddude” has 7, so the 5 also needs to be changed to a 7 to make this work. So to complete your admin username change, you’d end up changing this…

a:1:{i:0;s:5:”admin”;}

…into this…

a:1:{i:0;s:7:”baddude”;}

Once that’s done, you simply log out of your multisite admin area, log back in and it should be working fine.

Best,

-Seth C

 

 

Featured Plugin - WordPress Pop-Up Chat Plugin

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

Featured Plugin - WordPress Facebook Plugin

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Featured Plugin - WordPress Infinite SEO Plugin

Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more

Featured Plugin - WordPress Membership Site Plugin

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

Featured Plugin - WordPress Appointments Plugin

Take, set and manage appointments and client bookings without having to leave WordPress. Appointments+ makes it easy.
Find out more

Featured Plugin - WordPress Wiki Plugin

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Featured Plugin - WordPress Q&A Site Plugin

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - WordPress Google Maps Plugin

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Featured Plugin - WordPress Newsletter Plugin

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Comments (7)

  1. Thanks for the email Saana, it appears you’ve already got a few sites running on your multisite network, so there’s one additional step required to make sure your superadmin status remains. I’ve just added it to the post. Thanks for contributing!

Participate