WordPress Login URL: How to Find, Change, and Hide It

When you install WordPress, it automatically sets up a login page for your website. That page lets you access the dashboard as an administrator. So, knowing your WordPress login URL is essential if you want to make any changes to your website.

The CMS (content management system) uses a standard login URL for most websites (unless your web host changes it), so usually this is pretty simple. But it is possible to change the WordPress login link and hide it so no one else can access the admin dashboard. If you lose that, things could get a bit trickier.

In this article, we’ll talk about how to find, change, and hide the WordPress login URL.

Why the WordPress login page is important

You can’t make any changes to your WordPress website without accessing the dashboard. To get to the dashboard, you need to go through the WordPress login process by entering your username or email address and password.

the WordPress login screen

By default, WordPress doesn’t hide the login page. Any user can find it provided they know how WordPress structures login URLs. Still, visitors shouldn’t be able to get past the login page unless they have a set of credentials.

When you launch a new WordPress website, the CMS automatically sets up an administrator account for you. The “administrator” user role is the only one with full permissions for every tool and setting within the dashboard. That means if someone else gets their hands on your admin account credentials, they also get complete access to your site.

With WordPress, you can set up multiple types of accounts for other users. As long as those accounts have secure credentials, unauthorized access shouldn’t be a big issue. Still, one thing you can do to secure your website against attacks is to hide the WordPress admin URL.

How to find your WordPress login URL

Finding the WordPress login URL should be a relatively straightforward process. By default, the CMS uses a standard admin link structure for its installations. 

But some web hosts automatically change WordPress login URLs for increased security. Let’s explore how to find the URL in both cases.

What is the default WordPress login URL?

WordPress uses a standard login URL for installations unless you modify code. That link should look something like this:

yourwebsite.com/wp-login.php

Appending the /wp-login.php suffix to your domain should lead you straight to the WordPress login page. The same basic structure applies if you’re using subdomains or subdirectories like these:

shop.yourwebsite.com/wp-login.php

yourwebsite.com/shop/wp-login.php

That’s not the only way to access the login page, though. WordPress will reroute you to the login page if you try to jump directly into the dashboard and you’re not logged in. 

By default, you can find the WordPress admin login at:

yourwebsite.com/wp-admin

If none of those URLs work, you may be dealing with a web host that uses custom WordPress login and admin addresses. Some web hosts utilize this setup to make it harder for attackers to access your site.

How to find a custom WordPress login URL

As you might already know, some web hosts can automatically set up WordPress for you. These WordPress hosting providers may also automatically change the default login URL structure. If that happens, they’ll probably include a link to the login page in an email or within your hosting control panel.

Depending on the web host, you might also be able to bypass the WordPress login process altogether. Some hosting control panels include one-click access links to the WordPress admin dashboard.

one-click WordPress access through a hosting portal

If your web host doesn’t offer that option, you may need to locate the login URL manually. The easiest way to do this is by connecting to your website via File Transfer Protocol (FTP). Then, you can open the WordPress core file that specifies the login link.

You’ll need a set of FTP credentials and a client like FileZilla to connect to the server. If you’re not sure about your FTP credentials, you should be able to find them through your web host.

SFTP credentials from a web host

Once you connect to the server via FTP, navigate to the WordPress root folder. It should have a name like public, public_html, www, or your site’s name. 

Inside, you’ll find a file called wp-login.php.

finding wp-login.php via the file manager

Open the file using a text editor and be careful not to edit any code. Use the text editor’s search tool to look for a string that reads site_url. That should lead you to a line of code that specifies your site’s custom login URL.

finding your custom WordPress login URL

In the example above, the custom login address is login-page.php. If you take that address and add it to your domain, you’ll have a URL that looks like this:

yourwebsite.com/login-page.php

You can use the wp-login.php file to change the login URL for your website manually. We’ll show you how to do that further on. For now, remember to bookmark the WordPress login page in case you forget its URL.

How to access the WordPress login page from the front end

If you want to streamline access to the login page for you and other users, you can link to it from any other page on your website. 

If you’re using the Block Editor, you can add the Log in/out block to any page that you want.

adding the log in/out block to a page

The Log in/out block adds a simple link that you can use to either log in or out of your site. One downside of this approach is that you may leave your site more vulnerable to attackers who want to force their way through the login page.

As long as you practice good security measures like enforcing strong passwords and Two-Factor Authentication (2FA), there shouldn’t be a problem linking to the login page. The decision is up to you, though.

How to change the default WordPress login URL 

For this tutorial, we’ll show you how to change the WordPress admin login URL using two methods: manual and with a plugin. We’re going to start with the plugin approach, which is the recommended option in most cases.

1. Use a plugin to change the default WordPress login URL

The easiest way to change the WordPress login URL is by using a plugin. Several tools can handle the job, but we’ll be working with WPS Hide Login in this tutorial.

The plugin can help you hide the WordPress login and the /wp-admin URL. It does that by changing the WordPress login URL. It also re-routes any attempt to access the login and admin pages through their default addresses.

To change the login URL, activate the plugin and go to Settings → WPS Hide Login. You can also find the plugin settings at the bottom of the Settings → General configuration page.

In this section, you’ll find a field to enter a new WordPress login URL. You can also configure which page should load if another user attempts to access the default admin or login addresses.

settings for changing the WordPress login URL

Click on Save Changes, and you’re good to go. If you try accessing the default WordPress login address, it should redirect you to the page that you just set up. To log in again, you’ll need to use the new URL, so make sure to save it.

2. Change the default WordPress login URL manually

We recommend using a plugin for changing the WordPress login URL because it’s both easier and safer. When you edit the WordPress login page manually, you risk breaking a core feature within your website, since you’re dealing with several vital files.

Another downside of changing the login URL manually is that the process can revert when updating WordPress. The only way to avoid that is by creating a new login page altogether and using a child theme.

If you decide to proceed manually, changing the login URL involves editing a copy of the wp-login.php file. 

Connect to your website via FTP and navigate to the WordPress root directory to locate that file. Find the wp-login.php file and download a copy of it to your computer.

First, open the local copy of wp-login.php using a text editor. Preferably, you’ll want to use a text editor that includes a “search and replace” tool. That feature can change all of the existing WordPress login URL instances within the file (and there are a lot of them!).

Use the search tool to find every instance of the wp-login.php string and change it to the name you want to use for the new login page. 

For example, you can replace that string with “access.php”:

replacing the wp-login URL

This process aims to preserve the structure and functionality of the WordPress login page while changing its URL. After replacing every instance of wp-login.php, save the edits to the file and close it. 

Now rename that file after the new URL that you chose. In our case, the file would be called access.php.

Go ahead and upload that file to the WordPress root directory. Both the wp-login.php and the new login page file should now be there.

Next, head to wp-content/themes and find the folder for the child theme you’re using. It’s important to reiterate that you need to use a child theme unless you want your customizations to disappear when the theme updates.

Open the child theme folder and look for the functions.php file inside. Go ahead and open it.

finding the function.php file

Add the following WordPress “hook” inside of it, before the line that reads // END ENQUEUE PARENT ACTION:

add_filter( ‘login_url’, ‘custom_login_url’, PHP_INT_MAX );
function custom_login_url( $login_url ) {
$login_url = site_url( ‘access.php’, ‘login’ );
    return $login_url;
}

Replace the access.php string with the name of your new WordPress login file. That code tells WordPress to use a specific file for its login page as long as it contains a standard login form.

Save the changes to functions.php and try accessing the custom login URL you just set up. It should work exactly like the original wp-login.php file. Additionally, if you use a Log in/out block within the Block Editor, it’ll now point to that new page.

At this stage, you can return to the WordPress root directory and delete the original wp-login.php file. If you change themes at some point, remember that you’ll need to add that hook to the new theme’s functions.php file for the custom login page to work.

What to do if your custom WordPress login URL isn’t working

If you try to access your custom login URL and it doesn’t work, there are several possible causes. Let’s go through the most common ones. 

1. What to do if you changed the WordPress login URL with a plugin

If you configured a custom login URL using a plugin, the new address shouldn’t stop working unless you disable the plugin. 

WPS Hide Login, for example, reverts your login address to its original URL if you deactivate the plugin. In that case, you should be able to access the dashboard using the default login link.

If the plugin is active, you might be dealing with a compatibility issue with WordPress or another plugin. In that scenario, your best bet might be to temporarily disable the plugin so that you can access the WordPress admin dashboard and continue to update your site. 

To disable a plugin without access to the admin dashboard, you’ll need to use FTP. Connect to your website via FTP and navigate to wp-content/plugins

Identify the folder that corresponds to the plugin that changed the login URL (it should have a similar name) and either rename or delete it.

deactivating a plugin via FTP

Deleting the plugin folder will uninstall it, whereas renaming it will temporarily disable it. In either case, disabling the plugin should fix the compatibility issue. Your WordPress login page will revert to the original URL, and you’ll be able to access the admin dashboard.

2. What to do if you changed the WordPress login URL manually

There are several reasons why a custom login URL can stop working if you changed the address manually. Editing the WordPress login address usually involves the following steps:

  1. Creating a new login page to replace wp-login.php
  2. Modifying your active theme’s functions.php file to recognize the new login page

In some cases, updating WordPress might delete the new login page you added to the root directory. Alternatively, if you’re not using a child theme and you update the active theme, that will override any changes that you made to its functions.php file.

Before anything else, try accessing the default WordPress login address. If it works, you’ll need to change the address manually once more. You can do that by following the instructions in the earlier part of this troubleshooting guide. 

3. What to do if your web host changed your WordPress login URL

If you’re using a web host that provides you with a custom WordPress login URL out of the box, it shouldn’t stop working suddenly. If it does happen, we recommend checking your site’s database or wp-login.php file to see if the custom URL changed.

In some cases, the custom login URL might stop working due to problems on your hosting provider’s end. If that happens, your only option will be to reach out to their support team so that they can help you troubleshoot the issue.

How to level up and secure your WordPress login page

Changing the login URL is a great first step to protecting your WordPress website. But even with a custom link, your login page can still be vulnerable to attackers.

It’s not uncommon for attackers to find login credentials from leaks. Other malicious actors might also try to brute force their way through the login page. 

If you want to reduce the chances of the wrong people getting access to your WordPress dashboard, here are some measures that you can take:

  • Use a 2FA plugin. Enabling this kind of security plugin makes it much more difficult for attackers to break in because it requires users to be in possession of a specific physical device in addition to the correct login credentials. 
  • Whitelist IP addresses. You can use the .htaccess file to whitelist the IP addresses that should have access to the WordPress dashboard. Any IP that’s not on the whitelist won’t be able to log in.
  • Implement a CAPTCHA. Using a simple CAPTCHA can be a great way to protect the login page against bots and brute force attacks.
  • Limit the number of potential login attempts. Limiting how many login attempts someone can make in a specific period is a fantastic way to dissuade attackers from trying to guess credentials.
  • Enforce the use of strong passwords. Unfortunately, many people reuse passwords or utilize weak credentials. Enforcing strong passwords might annoy some users, but it can help protect your website against attackers.

Simply changing the WordPress login URL makes it more difficult for hackers to break into your website. To get through the login page, they’ll need to find it first. As long as the new address isn’t obvious, you should be safe.

It’s in your best interest to protect your login page as much as possible. That rule applies particularly if you run a site that stores any kind of sensitive user data.

Jetpack has many great WordPress security tools, including a powerful one that helps defend against brute force attacks. It also includes tools that help you whitelist IP addresses and block spam comments.

Frequently asked questions about the WordPress login page

If you still have any questions about WordPress login pages and their URLs, this section will answer them. 

Why is my WordPress login not working?

If you can access the WordPress login page but can’t enter the dashboard, there’s probably an issue with your credentials. WordPress enables you to recover lost passwords if you have access to the email address associated with the account.

If the login page itself isn’t working and you’re using a custom URL, there might be a problem with its implementation. We have instructions on what to do if you changed the login URL with a plugin or manually, so you can check them out above!

What should I change the WordPress login URL to?

You can change the WordPress login URL to any address that you want. If you value ease of use, you might prefer to change the address to something easy to remember for you and other users.

Alternatively, you can choose a unique WordPress login address that other people won’t be able to guess. You can easily bookmark the login page and share the link with your trusted team members. This approach can be wise from a security standpoint.

Protect your WordPress login page from attacks

One of the best parts of using WordPress is that you can manage every aspect of your website from the dashboard. Still, you need to go through the WordPress login page first. If you use the default login URL, anyone can find the page and try to break through. Changing the WordPress login URL is a simple way to protect against intrusions.

The best way to change the WordPress login URL is by using a plugin like WPS Hide Login. You can also adjust the login link manually. But this process requires you to edit WordPress core files, so we don’t recommend it.

Creating a custom WordPress login page is just one option for website security. The Jetpack plugin can also help by backing up your site’s files, running security checks, and protecting against spam. Check out Jetpack’s security features for more information!

This entry was posted in Security. Bookmark the permalink.

Simon Keating profile
Simon Keating

Simon has worked in marketing and product development for over 10 years, previously at HubSpot, Workday, and now Automattic (Jetpack). He has a varied education, with a degree in chemical engineering and a masters in computer science to his name. His passion is helping people and their businesses grow.

Explore the benefits of Jetpack

Learn how Jetpack can help you protect, speed up, and grow your WordPress site.

Get up to 60% off your first year.

Compare plans

Have a question?

Comments are closed for this article, but we're still here to help! Visit the support forum and we'll be happy to answer any questions.

View support forum
  • Enter your email address to follow this blog and receive news and updates from Jetpack!

    Join 110,739 other followers

  • Browse by Topic

  • %d bloggers like this: