WordPress Tips

How to change the user ID in WordPress?

How to change the admin user ID in WordPress, how is it done?

This article is under review since the plugin we are talking about is no longer in the WordPress repository (it is under review). We recommend using one of the two for now alternative methods that we offer in the article 🙂

The security of your website is important and sometimes a small adjustment can increase the security of your website exponentially. In this article I will cover the topic of how to change the user ID in WordPress, and how this can benefit your site. Go for it!

What is the use of changing the user ID in WordPress?

Have you ever installed a WordPress? If so, you know that when installing it you are asked to create the first user. there is the "trouble"! You are unknowingly creating a user with ID number 1 on your website who has the admin role.

What does that mean? In a simple way, this means that if someone puts in the URL of your website /?author=1 would reach the author page of the admin user, so already I would know the username, that is, 50% of the access data.

How to Change User ID in WordPress

One of the easiest methods to prevent them from finding our managed userr is change the ID. This, to make it an easy and fast process, we will do it using a plugin.

Changing the ID with User ID Changer

User ID Changer is a plugin that allows you, among other things, to change your user's ID to the number you want (you'll have to type it). 

you just go to Plugins > Add New, search for “User ID Changer” and install the author's interwebDEFENCE. Once this is done, go to Users > User ID Changer and select in the purple fields the user whose ID you want to change and the new ID number. Save changes and you're good to go. Now it will be more difficult to find your admin user by trying the ID in the URL, and if by chance you were to hit (among the possible 10 billion numbers), you would no longer be certain that that user is an admin.

Once the process is finished, we can uninstall the plugin since the changes will be preserved.

Other Ways to Change User ID in WordPress

As I have already said, the plugin retains the changes even after uninstalling it, being a fast and very comfortable option for those who do not want to complicate it. Still, it's worth mentioning that there are other ways to do it, such as:

  • Modify the information directly in the database: This is what the plugin does, but you can also do it manually. You will have to replace the user ID with the one you want in all the fields that are necessary (because if one is missing, it could affect the correct functioning of the site).
  • Create a second administrator user and delete the first one manually from the administrator: It will seem silly, but this is quite effective. Normally whoever is looking for author 1 will not be a person, but a machine that checks if this page redirects to a real author and in this way try with that name to access the site. Another number is no longer guaranteed to find the admin, so sometimes they only look for the author with ID 1.

And that would be all! Do you want your site to be a little more secure? Try changing the Author ID!

¡Subscribe to our newsletter and receive our offers, news and discounts directly to your email!