Skip to main content
WordPress made easy with the drag & drop Total WordPress Theme!Learn More

How to Delete WordPress Admin Username Permanently

Last updated on:

This tutorial discusses the importance of WordPress security and the immediate hazard surrounding the practice of using the ‘admin’ user account. We’ve written a tutorial describing how change the default admin username in WordPress. If you’re familiar with the aforementioned dangers, I suggest you skip to the tutorial part. Others can continue reading.

WordPress security is no trivial thing. In fact, given the vast number of direct brute-force attacks on the millions of websites powered by WordPress, one might think that webmasters devote 30-50% of their attention to the site’s security. Surprisingly, that’s not the case. Truth is, WordPress security finds itself right at the bottom, (if at all present), in a website’s to-do list. It is one of the most undermined factors in a novice webmaster’s list of concerns. In most cases, either of two things happen:

  1. The webmaster evaluates the site to be unimportant and hence not a potential target for hackers
  2. He simply forgets about the security aspect

Whatever the situation, you’ll be in a real jam when your site is hacked. We firmly believe that prevention is better than cure – that’s why we’re using Managed WordPress Hosting from WPEngine. It’s rock solid and comes with bullet-proof security. Our site hasn’t been hacked yet. Go ahead, we dare you! 😀 In the effort of carrying on our “prevent rather than cure” ritual, let’s talk about the WordPress admin (or administrator) account and learn how to plug that security hole once and forever.

What Is The WordPress Administrator Account?

Better known as the admin account, it is the default account name that comes in every new WordPress installation. Its user role is Administrator, which means it holds the highest access power in every WordPress site. It can inject malicious code, steal sensitive data and in the worst case – delete your site completely. In a nutshell, using admin as the username for an account with Administrative privileges (i.e.the Administrator User Role), is a huge security loophole.

Why? Glad you want to know. When a hacker wants to gain access to your WordPress site, he needs to decipher 2 elements:

  1. WordPress Username
  2. Corresponding Password

logging in with admin username 50 percent job done

When most WordPress sites are running “admin” as their username, the hacker has 50% of his work cut out for him. He could simply start the brute-force attack (which is nothing but trying every possible character combination as the password) and sit back and sip his coffee, while the (massive) computer grid crunches 1000s of characters per second and destabilizes your server.

Now do you want to fall under that category? I am guessing pretty certain that you’re not. So let’s never, ever use admin as a username in any WordPress installation in the future. But what about the folks who already have their WordPress account with admin as a username?

wp profile before profile change

Usernames are not changeable. That’s what we know (so far). So what can be done? Well, for starters, you can use a super strong password. An assortment of alphanumeric, mixed case and special symbols in your password with a length of around 35 characters, should take a while to decipher. However, if you wish to treat the hack boy to the full course (i.e. he must interpret both the username and password), then you should change the admin username entirely.

Delete Or Change The Admin Username

Option 1 is to create an entirely new admin account with a unique name and strong password, log back into your WordPress installation with the new admin account and then delete your old account. You should be prompted to reassign all of your old posts to another user (e.g. your new admin account). Option 2 is to change your current admin account using phpMyAdmin. Follow along with the tutorial below to see how.

Gain Access To phpMyAdmin

phpMyAdmin is a web-based GUI software which gives you interactive access to your server’s database. Some might call it a front-end editor for your database. Most shared hosting providers give access to phpMyAdmin and is available in cPanel. Once you get access, select your WordPress database. In our case it’s wpe-tut.

change wordpress admin username 01

phpMyAdmin will list all the tables in that database. The tables shown in the following screenshot are the default ones in a WordPress installation. We want to select wp_users since it contains the value we want to edit.

change wordpress admin username 02

Selecting The Correct Username

Now you should see a screenshot like this. Let’s study it carefully.

change wordpress admin username 03

  1. ID: This is the bookkeeping variable. It is used to sequentially identify all the users that have registered in a WordPress installation. Since admin is the first user to be registered, its ID is 1. In this tutorial, we have used no other users.
  2. user_login is the variable storing the actual username of the user.
  3. user_pass contains the corresponding password, encrypted in MD5.
  4. user_nicename is the full name of the user
  5. user_email is the variable that stores the email address of that user
  6. display_name is how the username is displayed across posts and pages. For example posts by some users are shown as “Editorial Team” instead of “Joe Smith”
  7. The other fields present are not important for this tutorial.

We want to change the user_login field. Optionally we could change user_nicename and display_name. To do this, we select the Edit option.

change wordpress admin username

phpMyAdmin will take us to the individual fields for the admin entry under wp_users.

change wordpress admin username 05

We now change the values to suitable ones. I’ve changed mine to Sourav and its derivatives.

change wordpress admin username 06

Once completed, click on Go to commit the changes. You should get a message like this:

change wordpress admin username 07 sql update success

Now when you check the wp_users entry, the admin username will no longer be present. You’ll find the value you’ve set user_login to, as the new username. That’s completes the working phase of our tutorial. Let’s test it out. We login to WordPress using the new username and the old password.

change wordpress admin username 09 login success

And booyah, it works!

change wordpress admin username 10 wp dashboard

WordPress clearly recognizes the new username. All previous data have been left unhampered. Remember, if you use a caching plugin, you must purge the entire cache, if you have a lot of posts submitted under the admin username. We can also check out our User Profile found under Settings. This is what we should get:

wp profile after

Conclusion

Changing the default WordPress admin account to something else hardens the security of your WordPress site. It is considered one of the best security practices for all WordPress webmasters and/or developers. If you’ve been using the admin username, it is high time you changed it.

This tutorial is 100% WordPress intensive. I’ve explained the WordPress’ database’s table attributes along with their respective purposes. Just follow the screenshots and you’re good to go. If you ever get stuck, the comment form is all yours. You could also ping me on Twitter. Over to you – do you know of another way to change the admin username of WordPress? Have an uber-cool security tip? Do let us know!

delete-wordpress-admin
Article by Sourav WPExplorer.com guest author
Subscribe to the Newsletter

Get our latest news, tutorials, guides, tips & deals delivered to your inbox.

11 Comments

  1. Adrian Fusiarski

    I’m pretty sure that there is an easier way of changing (any) admin user name than going through PHPAdmin. Correct me if I’m wrong but if you add a new user with Admin privileges, then logout and login again with the NEW user name and PW you can then delete the old admin name. You can move all the posts attributed to the OLD user over to the NEW user name BEFORE you delete.

    Much easier 🙂

    • AJ Clarke

      Yes you can do it that way, we mention it in the post 😉 This method works for people that aren’t sure what their admin password is and need to make a new one.

      • alexarvixe

        It is a very detailed article, good job! But in this case I think it would be much easier to detail how to reset a password directly within PhpMyAdmin.

        That would most likely be the method I recommend should one of our clients forget their admin username/password.

  2. Ray

    Am I missing something here? You’ve set the new [admin user name], [nick name] and [display name] to ‘Sourav’

    IF I was attempting to hack your site, I would try user name ‘Sourav’ as the sites [admin name] because typically ‘Sourav’ would be the name associated with the majority of the posts. (if author is displayed)

    I’d suggest using different [display name]’s and [nick name]’s for an additional layer of security !

    • AJ Clarke

      I agree Ray, but this was just an example Sourav was using for the screenshots for this specific post which is about deleting the admin and not about WordPress security. However, it’s true if your concern was security then I would also recommend as you say and use something a bit different then your name 😉

  3. Just Marine

    Do you operate a WordPress network of sites? Do not follow these instructions if you have a WordPress network (variously called multi-user or multi-site) installation. You will lose your Network dashboard.

    • AJ Clarke

      Good call!

    • eyuan1

      Do you have a modifying solution for multi-site other than deleting the admin user? Thanks!

  4. PPR

    Hey DO you know how can I delete my word press account permanently ?

    • AJ Clarke

      Sorry I am not sure, I work with self-hosted WordPress and don’t have much experience with WP.com.

Leave a Reply

Your email address will not be published. Required fields are marked *

Learn how your comment data is processed by viewing our privacy policy here.