Portal Home Knowledgebase 3. WordPress How to Change WordPress Admin URL

How to Change WordPress Admin URL Print

  • 0

Changing the WordPress login URL is an effective way to enhance the security of your site. By obscuring the login page, you can help prevent unauthorized access and reduce the risk of brute-force attacks. Here’s a step-by-step guide on how to change your WordPress login URL using a plugin or manually through the functions.php file.

Method 1: Change Your Login Page Using the WPS Hide Login Plugin

Using the WPS Hide Login plugin is the simplest way to change your WordPress login URL. This plugin is lightweight and does not modify any core files or add rewrite rules. Here’s how to do it:

  1. Log into the WordPress Dashboard:

    • Navigate to your WordPress admin panel.
  2. Install the WPS Hide Login Plugin:

    • Go to Plugins > Add New.
    • In the search bar, type “WPS Hide Login.”
    • Click Install Now next to the plugin.
    • After installation, click Activate.
  3. Configure the Plugin:

    • Go to Settings > WPS Hide Login.
    • Enter your new desired login URL in the designated field.
    • Click Save Changes.

    For example, your login URL might change from yourwebsite.com/wp-admin to yourwebsite.com/new-login-url. After saving the changes, the old login URL will no longer work.

Method 2: Change Your Login Page Using the functions.php File

If you prefer to change the login URL manually, you can do so by editing your theme’s functions.php file. Here’s how:

  1. Access the functions.php File:

    • Go to Appearance > Theme Editor.
    • On the right sidebar, locate and select the functions.php file of your active theme.
  2. Add the Custom Code:

    • Insert the following code snippet at the end of the functions.php file:
function custom_admin_url() { return '/my-secret-login'; // Replace 'my-secret-login' with your desired login URL } add_filter('login_url', 'custom_admin_url');

  1. Save the Changes:

    • Click the Update File button to save your changes.
  2. Log Out and Log Back In:

    • You may need to log out of your WordPress account and log back in for the changes to take effect.

Important Note

Changing the login URL is a security measure, but it does not guarantee complete protection. It merely adds an extra layer of security to make it more difficult for hackers to locate your login page.

Additional Security Measures

For even greater security, consider editing your .htaccess file to password-protect your login page. Here’s a brief overview:

  1. Edit the .htaccess File:

    • Access your website via FTP or a file manager in your hosting control panel.
    • Locate the .htaccess file in the root directory of your WordPress installation.
  2. Add Password Protection:

    • Use a .htpasswd file in conjunction with the .htaccess file to restrict access to your login page to those who know the password.

By following these methods, you can effectively change your WordPress login URL and enhance the overall security of your website. Remember to always back up your website before making any changes.


Was this answer helpful?

« Back