If you have tried to change your WordPress administrator username you will know WordPress will not allow you to do so. To work around this you need to create a new administrator account with a new username and then delete the old administrator account.
Before doing this you need to ask yourself what are the reasons for changing your WordPress administrator username. Is it for security reasons, do you want to be the only person that knows your username but are concerned it may have been compromised or is too weak? Maybe you have the dreaded “admin” as a username, which means the whole world knows your WordPress administrator username!!
I said “dreaded” because WordPress used to have a default username of “admin” that many people never changed, hence hackers commonly use “admin” when trying to break into WordPress sites.
If you are changing your administrator username because of the above mentioned reasons there is an important point that you need to be aware of, which is: If you are using your administrator account for posting your content and want to carry on using your administrator account for posting your content, then changing your WordPress administrator username for the reason of keeping it private could be a complete waste of time.
I have explained why in this post: WordPress Administrator Username – Keep it Secure.
Ok, now you’ve read that post you will understand my thinking of how easy it could be to obtain WordPress usernames.
I fell in to the category of wanting to keep my administrator username private and as I had been using it for posting content, I decided to change my administrator username whilst at the same time move my posts away from my administrator account. I did this by creating new WordPress user roles and moving the posts over to them. Next I will show you how I did this.
WARNING: IF YOU ARE GOING TO ATTEMPT WHAT I AM ABOUT TO SHOW YOU, BEFORE STARTING YOU MUST BACK UP YOUR SITE.
Below is a screen shot of my test site with one administrator user which you can see has published five posts. So let’s say this is your site and you want to change the administrator username from “dave” to “newadminuser” and move your posts away from the administrator level.
To get to this screen, when logged in to your WordPress dashboard click on “Users”.
First you need to create a new administrator user. In “Users” click on “Add New” as shown below. Enter your details and select the role of “Administrator” from the drop down menu. Then click on “Add New User”. Note: you will not be able to use the same email address that is already being used for the existing administrator user or any other users you already have.
You need to go through the above process again to create another account with lesser capabilities that you want to use for posting your content. To help you decide which role to use, click on the following link which will explain the difference between WordPress user levels and roles: WordPress User Roles Explained.
For this example the “Author” role is selected with a username of “postcontent”.
Now when you click on “Users” you will see a screen like this with two administrator roles and one author role. Next you need to log out of WordPress and log back in to the new administrator account you have just created.
FINAL WARNING: BEFORE YOU PROCEED WITH THIS NEXT STEP YOU MUST BACK UP YOUR SITE.
As you are now logged in to your newly created administrator account you can delete the unwanted administrator account “dave”. Click on “Delete” as shown below.
Next you need to select “Attribute all posts to”. As you don’t want to attribute the posts back to an administrator, select “postcontent”, which is the new author user you have created, from the drop down menu. Then click on “Confirm Deletion”. I know this may seem obvious, however, IF YOU DO NOT ATTRIBUTE YOUR POSTS TO ANOTHER USER THEY WILL BE DELETED.
You will then be taken to the following “Users” screen. Here you will see the new administrator is in place with a new username and no posts, as they have all been handed over to the new author role.
You may be concerned about what might happen to your pages during this process, as when you came to delete the old administrator account you only had the choice of “Attribute all posts to”. So what about any pages that the last administrator may have produced?
You will find they get attributed to your selected user as well. Before deleting the administrator account “dave” I also used it to publish five test pages as you can see below.
Here is the screenshot after I deleted the administrator account “dave” which is now showing the page author as “postcontent”.
When I went through this same process I had about eight posts and five pages and it all went very smoothly, so far I have not noticed any problems. However, like I did, YOU MUST BACK UP YOUR SITE BEFORE DOING THIS!! Have I mentioned that before??
Photo © Depositphotos.com/Ronalds Stikans