How to change the WordPress login URL in three different ways.

How to change the WordPress login URL is a crucial issue for the security of your website. All WordPress websites share a common aspect that may not be initially obvious: they use the same default login URL.
Typically, this URL can be something like tuweb.com/wp-admin or tuweb.com/wp-login.
While this may seem convenient, it actually increases your site's vulnerability to hacker and cybercriminal attacks. Considering that WordPress is the most popular content management system (CMS) in use today, the risks associated with keeping the default login URL are significantly high.
For this reason, changing your WordPress login URL is a critical step in strengthening your site's security. In this article, we will explore all the possible ways you can modify your WordPress login URL to protect your site from unauthorized access.
- What makes WordPress login important?
- Steps to change your WordPress login URL
- 1. Change the WordPress login URL by inserting a code snippet
- 2. Manually changing the WordPress login URL
- 3. Changing the WordPress login URL with a plugin
- Change WordPress login URL with security plugins
- Conclusion
- Frequently Asked Questions
What makes WordPress login important?
Once you install WordPress, you will get access to your website's administration panel, a crucial area where you can make all the necessary adjustments.
The login URL or administrator URL is the web address that allows you to enter this management area. This URL plays a vital role in the overall administration of your site. However, because this URL is standard, it makes it easy for anyone to try to access your admin panel. In addition, WordPress generates by default an "admin" username, which can simplify the work of a hacker.
The only obstacle for an intruder would be guessing the password you have set. As hackers try to figure out the correct password, your site's resources are consumed inefficiently.
A recent study revealed that the 75% of Americans use weak passwords, which could indicate that your site is not sufficiently protected against attacks.
By changing the URL, you can decrease these risks and avoid excessive unwanted bot traffic to your site.
While changing the WordPress URL doesn't provide you with total protection against hackers, it can definitely make your site less susceptible to attacks.
🚀 How to remove clipart in WordPress
Steps to change your WordPress login URL
The first step to increasing the security of your WordPress site is to find your login URL, which is fairly straightforward. Simply add /admin/ or /login/ at the end of your site's URL.
For example, you can try www.tusitioweb.com/login/ or www.tusitioweb.com/admin/.
Generally, these addresses will take you directly to the login page. If not, try adding /wp-login.php to the end of the main URL, as in www.tusitioweb.com/wp-login.php.
To change the WordPress login URL, you can choose to do it manually by modifying your site's core files, although this requires care as an error could affect the site's functionality. Also, each time you update WordPress, it will reset the default login URL, so you will have to repeat the process.
A simpler and safer alternative is to use a security plugin, which avoids having to edit files directly and offers a long-lasting, hassle-free solution.
Another option is to modify the functions.php file of your theme, inserting specific codes to change the URL. However, if you use incorrect codes, you could cause serious errors and even lose access to the WordPress administration panel.
If you are not experienced in programming or prefer to avoid complications, use a plugin is the most recommended and easiest option to implement.
1. Change the WordPress login URL by inserting a code snippet
In this first method, we will modify the default WordPress login URL by inserting a PHP code snippet in the functions.php file of our child theme.
Follow these steps:
- Go to Appearance -> Theme Editor and select your child theme's functions.php file from the menu on the right.
- Scroll to the end of the file and add the following code:
// Redirects the default URL to a custom page
add_action('init', 'custom_login');
function custom_login() {
global $pagenow;
if ('wp-login.php' == $pagenow && $_GET['action'] != "logout" && $_GET['action'] != "lostpassword") {
wp_redirect('your-new-url-here');
exit();
}
}
Replace 'your-new-url-here' with the actual link to your new login page. You can design a new login or registration form using tools such as Elementor or other page creation plugins.
- Save the changes and, to verify that everything works correctly, open an incognito window and access /wp-admin. You should be automatically redirected to the new custom URL.
This method is ideal for customizing your login experience and increasing the security of your site by hiding the default login URL.

2. Manually changing the WordPress login URL
Changing the WordPress login URL manually is a straightforward process, and below, we'll walk you through the necessary steps to do it safely and effectively.
Before you begin, it is crucial that you perform a backup copy of your website. This will allow you to restore your site in case an error occurs during the process. The backup should include all of your site's files, especially those in the public_html directory.
Steps to change the WordPress login URL manually:
Choose a code editor: use a reliable code editor such as Notepad++ or Sublime Text to edit your site files. No matter which editor you choose, the process will be the same.
Select a new login URL: decide what your new login URL will be. For example, you could choose /mynewlogin.php as your new address.
Rename the wp-login.php file: Change the name of the wp-login.php file to the new name you've chosen—in this case, /mynewlogin.php.

Edit the new login file: Open the mynewlogin.php file in your code editor. Find all instances where "wp-login.php" is mentioned and replace them with "mynewlogin.php." Use the editor's bulk replace feature to do this quickly and efficiently.

Save your changes and test the new URL: Once you've saved your changes, try logging in to WordPress using your new custom URL. For example, if you're working in a local environment, the URL will look something like localhost/wp/mynewlogin.php. Any attempt to access the site using the old URL will result in a 404 error page, indicating that the login URL has been successfully changed.
By following these steps, you not only customize your user experience but also enhance your site's security by hiding the standard access URL.

If something goes wrong, you can replace the backup file in the root directory, and the site will revert to its previous format.
3. Changing the WordPress login URL with a plugin
If you'd rather avoid making manual changes to WordPress core files, using a WordPress plugin is a simple and effective way to change the WordPress login URL. The advantage is that many of these plugins are free.
It's important to choose plugins that are lightweight and easy to use. Also, make sure the plugin you choose is up to date and offers good security features. This will help you keep your site secure while customizing the login URL to suit your needs.
How does a WordPress plugin work?
The plugin adds a few extra lines to the WordPress file .htaccess from WordPress. However, it does not modify or move the file wp-login.php or the wp-config.php file.
🚀 Best autoblogging plugins to automatically publish your blogs in WordPress
Here are the steps you need to follow.
To get started, install the plugin Easy Hide Login and activate it. We also recommend that you back up your site before installing it.
Go to the WordPress admin panel and navigate to Settings > Hide Easy Login.

Once you log in, you can enter a slug in the field. For example, you can enter "mynewlogin" as the slug. Then click the "Submit" button. This will be your new login page. Anyone who visits the original URL will see a 404 error message.

If you want to reverse the process, delete the slug text and click the "Submit" button, or disable the "Hide WPS Login" button. The URL will revert to its original format.
Once you've finished changing the login page, optimize your website by redirecting the logout link.
Change WordPress login URL with security plugins
Another excellent way to change the default WordPress login URL is to use various security plugins.
Installing a security plugin not only makes it easier to change the default WordPress login URL, but also provides more robust protection against potential threats.
In this section, we'll show you how to change the default URL using some of the best security plugins available for WordPress.
👉Defend
The plugin Defend from the WPMUDEV team is a great option for masking the default login link.

Once it's enabled on your website, navigate to Defender -> Tools and click the button Activate button.

Next, enter your custom slug in the field mask URL slug and save the changes.

You can get the Pro version of Defensor on the website official website or with us for just $4.99.
👉iThemes Security
The plugin iThemes Security It is one of the most popular security plugins for WordPress, with over one million active installations.

Once you've enabled it on your website, navigate to Security -> Settings -> Advanced -> Hide Backendand enable the option hide backend option.

Next, enter the new login URL slug you want to use instead of the default one, and save your changes.

Once saved, the new URL will take effect, and the default URL will no longer work.
Discover all the features the Pro version has to offer, available directly at the official website or buy it with us for just $4.99. Don't miss this chance to take your experience to the next level!
🚀 WordFence: Time to think about your Wordpress security
👉 Perfmatters
Performance and optimization plugins allow you to enable or disable WordPress features based on your preferences. Since WordPress is a versatile platform that can be used for a variety of purposes, it’s a good idea to enable only the features you need. That way, you can save valuable resources.
Many great optimization plugins increase site speed, improve SEO, and so on. In this example, we'll focus on Perfmatters.
Once you've activated the plugin on your WordPress website, go to Settings -> Perfmatters and scroll down to Login URL.

Enter the slug you want in the "Custom Login URL" field to replace the default one.

Once saved, navigate to the default login URL /wp-admin and check to see if an error message appears instead of the login form.

Next, go to the new login URL you created and test the login form on that page.

Alternatively, you can also replace the error message on the default URL page with custom text or even redirect it to the home page.
You can get the Perfmatters from the official website or by us for just $4.99.
👉 SecuPress
The SecuPress plugin for WordPress is another powerful plugin for redirecting the login and admin pages.

Once you activate SecuPress, go to SecuPress -> Modules -> Users and Login and enable the option replaces the login and admin pages option.
Enter the custom slug for your new login page and save your changes to complete the process.

You can get SecuPress Pro at their official website.
🚀 WordPress Maintenance Plugin: Your Complete Guide to Optimizing and Securing Your Website
Conclusion

So, these are the three easiest ways to change the WordPress login URL. Each of these methods is simple to implement and will help strengthen your site's security.
Although WordPress is a fairly secure platform, it's crucial not to overlook this simple step to protect your website.
Leave us a comment to let us know which method you've decided to use for this important task.
Frequently Asked Questions
Why should I change the login URL of my WordPress site?
Changing the login URL helps protect your site against brute force attacks by making it more difficult for hackers to find the gateway to your site's administration area.
Can I change the WordPress login URL without using a plugin?
Yes, you can change the login URL manually by editing the .htaccess file or by modifying your theme's functions.php file, although these methods require a certain level of technical knowledge.
What plugins are recommended for changing the WordPress login URL?
Plugins like WPS Hide Login, iThemes Security and All In One WP Security & Firewall are popular and reliable options that allow you to easily change the WordPress login URL.
Will changing the WordPress login URL affect the performance of my site?
No, changing the login URL should not affect your site's performance. It is a security measure that does not impact loading speed or overall site performance.
If I change the login URL, what should I do if I forget the new URL?
It is important to save the new URL in a safe place. If you forget it, you will need to access your site files via FTP or cPanel and check the plugin or configuration file where you made the change to retrieve or reset the URL.
Si quieres conocer otros artículos parecidos a Cómo cambiar la URL de inicio de sesión de WordPress de tres maneras diferentes puedes visitar la categoría Ayuda y Soporte.

Leave a Reply