Hide My WP Ghost
  • Features
    • All Features
    • Brute Force Protection
    • Limit Login Attempts
    • Website Activity Log
    • Website Security Check
    • Security Tweaks
    • Change Wp-Admin URL
  • Pricing
  • Help
  • My Account
  • Features
    • All Features
    • Brute Force Protection
    • Limit Login Attempts
    • Website Activity Log
    • Website Security Check
    • Security Tweaks
    • Change Wp-Admin URL
  • Pricing
  • Help
  • My Account
Buy Now
  • Home
  • Hide My WP Features
  • How To Change And Hide The WordPress Login Path With WP Ghost

How to Change and Hide the WordPress Login Path with WP Ghost

Moved

This tutorial has moved to the new WP Ghost Knowledge Base where each feature is presented in detail.

View on new site
Table of Contents
  • Why Changing the Login Path Matters
  • How to Change and Hide the Login Path
    • Activate Safe Mode or Ghost Mode
    • Change the wp-login Path
      • Avoiding Path Conflicts
    • Hide wp-login.php, login.php, and Login Paths
    • Hide the New Custom Login Path from Redirects
      • Redirect When Accessing Hidden Paths
    • Hide the Language Switcher
    • Verify with a Security Check
  • Troubleshooting
    • Cannot Access the Login Page After Changing the Path
    • Plugin or Theme Conflicts
  • Frequently Asked Questions
    • Does changing the login URL actually improve security?
    • What is the difference between hiding wp-login and hiding wp-admin?
    • What if I forget my custom login URL?
    • Will registration and password reset still work?
    • Does this work with WooCommerce?
    • Does WP Ghost modify WordPress core files?
  • Related Tutorials

Change and hide the WordPress login path with WP Ghost (formerly Hide My WP Ghost) to prevent brute force attacks. The default /wp-login.php is the first URL every bot targets. Change it to a custom URL only you know, hide the old paths completely, and block redirects from exposing your new login page.

WordPress does not limit login attempts by default. Bots exploit this by targeting wp-login.php, login.php, and /login with automated password-guessing attacks. According to the LLAR 2025 report, brute force attempts surged 130% in 2024 alone. Those bots find the default login page first, then start guessing passwords.

Changing the login path is one of the most effective things you can do. Once changed, bots trying the default login URLs get a 404 error and move on. Your site never enters the attack pipeline.

Why Changing the Login Path Matters

Default login paths (exposed)With WP Ghost (secured)
/wp-login.php, /login.php, /login all accessibleAll default paths return 404
Bots find login form instantlyCustom URL only you know
Redirects can expose the login pageRedirect blocking hides even the custom path
Language switcher reveals WordPressSwitcher removed from login page

How to Change and Hide the Login Path

Activate Safe Mode or Ghost Mode

Before you can change individual paths, activate one of WP Ghost’s security levels. Go to WP Ghost > Change Paths > Level of Security. Select Safe Mode or Ghost Mode and click Save.

Safe Mode changes the login path along with other common WordPress paths. Ghost Mode adds wp-admin and admin-ajax.php path changes on top. Start with Safe Mode if you are unsure.

WP Ghost Level of Security panel showing Safe Mode and Ghost Mode options

Change the wp-login Path

Go to WP Ghost > Change Paths > Login Security. Enter a custom name in the Custom Login Path field. Click Save.

WP Ghost Login Security panel showing the Custom Login Path field

Avoid using words like “admin”, “login”, “user-login”, or “dashboard” in your custom path. Bots try common variations by default. Choose something unique to your site.

No files are moved

WP Ghost does not physically change the paths on your server. It uses rewrite rules to prevent any functionality errors. Deactivating the plugin restores all defaults instantly.

Avoiding Path Conflicts

WP Ghost automatically checks if another plugin has already customized the login path and notifies you if it detects a conflict. If you installed WP Ghost first and later add another plugin that modifies the login path, conflicts may occur. Always check that only one plugin manages the wp-login path at a time.


Hide wp-login.php, login.php, and Login Paths

After customizing the login path, hide the default WordPress login URLs so they return a 404 error for anyone who is not logged in.

Go to WP Ghost > Change Paths > Login Security. Switch on Hide “wp-login.php” and Hide “login”. Click Save.

WP Ghost toggles to hide wp-login.php and login paths from visitors and bots

When these are enabled, bots trying /wp-login.php, /login.php, or /login get a 404 error. The login form is only accessible through your custom URL.


Hide the New Custom Login Path from Redirects

Even after you create a custom login URL, some WordPress redirects may still point to it. If a plugin or theme triggers a login redirect, it could expose your new path to bots.

The Hide the New Login Path option prevents this. When activated, only direct access to your custom login URL works. Any internal WordPress redirect that tries to send users to the login page gets blocked and treated as a hidden path.

WP Ghost Hide the New Login Path toggle to block internal redirects from exposing the custom URL

Redirect When Accessing Hidden Paths

By default, hidden login paths return a 404 error. You can customize this to show a 403 Forbidden error or redirect to a custom page. Go to WP Ghost > Tweaks > Redirects > Redirect Hidden Paths and select your preferred action. See the Redirect Hidden Paths section for details.


Hide the Language Switcher

Since WordPress 5.9, a language switcher dropdown appears on the login page if your site has multiple languages. This element is another WordPress fingerprint that theme detectors can identify.

WP Ghost Hide the Language Switcher toggle to block internal redirects from exposing the custom URL

Go to WP Ghost > Change Paths > Login Security. Switch on Hide Language Switcher. Click Save.


Verify with a Security Check

After making your changes, verify everything is working. Go to WP Ghost > Security Check. Click Start Scan. The scan confirms if the wp-login and custom login paths are properly hidden and flags any remaining issues.

WP Ghost Security Check results confirming login path is hidden

Troubleshooting

Cannot Access the Login Page After Changing the Path

If you cannot reach the login page after changing the login path, try these steps in order:

Clear all caches. Clear your browser cache, WordPress caching plugin cache, CDN cache, and server-level cache. The path change significantly alters the site structure and cached pages may still reference old URLs.

Try a different browser. Open your custom login URL in an incognito window or different browser to rule out browser-specific caching.

Check the custom path. Make sure you entered the correct custom path. Try both example.com/yourcustompath and the default paths (/newlogin for Safe Mode, /ghost-login for Ghost Mode).

Use the Safe URL. If nothing works, use the Safe URL parameter to bypass WP Ghost temporarily. If that does not work, see the Emergency Disable guide. Once you’re back in the dashboard on WP Ghost Premium 9.0.13 or later, press Start Diagnosis in Ghost Doctor on the Level of Security page. It finds which path your server stopped serving and repairs it.

Plugin or Theme Conflicts

Some plugins and themes modify the login path or add their own login forms. If you experience issues after changing the path, deactivate other plugins one by one to identify the conflict. Switch to a default WordPress theme temporarily to check if your theme is the cause. Check the Compatibility Plugins List for known issues.


Frequently Asked Questions

Does changing the login URL actually improve security?

Yes. The overwhelming majority of WordPress login attacks are automated bots that target /wp-login.php by default. When that URL returns a 404, bots move on. For complete protection, pair this with brute force protection and two-factor authentication.

What is the difference between hiding wp-login and hiding wp-admin?

wp-login.php is the login form. wp-admin is the dashboard you see after you log in. They are two separate entry points, and bots target both. For maximum protection, change and hide both. WP Ghost handles each independently. See the Change wp-admin Path tutorial.

What if I forget my custom login URL?

Use the Safe URL parameter to bypass WP Ghost temporarily and access the default login page. If that does not work, rename the plugin folder via FTP to disable WP Ghost. See the Emergency Disable guide.

Will registration and password reset still work?

Yes. The wp-login.php file handles registration, password recovery, and user activation in addition to login. When you change the login path, all of these functions continue working through the new URL. You can also customize the register path and lost password path individually.

Does this work with WooCommerce?

Yes. WP Ghost is fully compatible with WooCommerce. The WooCommerce “My Account” login form works independently from wp-login.php, so changing the WordPress login path does not affect WooCommerce customer logins.

Does WP Ghost modify WordPress core files?

No. All path changes use rewrite rules and WordPress filters. No files are moved, renamed, or modified. Deactivating WP Ghost restores all defaults instantly.


Related Tutorials

Change and Hide the wp-admin Path – secure the other most-attacked WordPress path.

Customize All WordPress Paths – change every WordPress path in one guide.

Brute Force Attack Protection – add reCAPTCHA and login attempt limits.

Two-Factor Authentication – add 2FA for the strongest login security.

Magic Link Login – passwordless login via email link.

Temporary Logins – time-limited access links without sharing passwords.

Redirect Hidden Paths – customize what happens when bots hit hidden login URLs.

Website Security Check – verify your configuration after making changes.

June 11, 2023

Category: Tags:

  • WP Ghost CMS Simulator - Make WordPress Look Like Drupal or Joomla
    Previous
    WP Ghost CMS Simulator - Make WordPress Look Like Drupal or Joomla
  • How to Change and Hide the wp-admin Path in WordPress with WP Ghost
    Next
    How to Change and Hide the wp-admin Path in WordPress with WP Ghost
  • Installation & Setup
    • Download plugin
    • Activate Hide My WP Ghost
    • Setup in Safe Mode & Ghost Mode
  • Customize Paths
    • Change wp-admin Path
    • Change wp-login Path
    • Hide Language Switcher
    • Change Author Path
    • Change Lost Password Path
    • Change Register Path
    • Change Logout Path
    • Change Activation Path
    • Change admin-ajax.php Path
    • Change Paths in Ajax Calls
    • Change wp-content Path
    • Change wp-includes Path
    • Change uploads Path
    • Change comments Path
    • Change Plugins Path
    • Change Themes Path
    • Change Rest API Path
    • Hide RSD Endpoint
    • Disable XML-RPC access
    • Hide WordPress Common Paths
    • Hide WordPress Common Files
    • Add Security Headers for XSS
    • Firewall Against Script Injection
    • Block Theme Detectors
    • Remove Unsafe Headers
    • Disable Directory Browsing
  • Security Tweaks
    • Redirect Hidden Paths
    • Login Redirect URL
    • Logout Redirect URL
    • Change Paths For Logged Users
    • Change Paths In Cached Files
    • Change Relative to Absolute URLs
    • Change Paths in Sitemaps XML
    • Change Paths in Robots.txt
    • Hide Admin Toolbar
    • Hide WordPress Version
    • Hide HTML Comments
    • Hide IDs from META Tags
    • Hide WordPress Generator
    • Hide Emoji icons
    • Disable Embed scripts
    • Disable WLW Manifest scripts
    • Disable DB Debug in Frontent
    • Disable Right Click
    • Disable Copy-Paste
    • Disable Drag-Drop
    • Disable View-Source
    • Disable Inspect Element
    • Login Page Design
  • URL Mapping and Text Mapping
    • URL Mapping
    • Text Mapping
    • CDN URLs
    • Optimize CSS and JS files
  • Brute Force Attack Protection
    • Activate Brute Force Protection
    • Math Captcha Protection
    • Google reCaptcha V2
    • Google reCaptcha V3
    • Ban IP addresses
    • Whitelist IP addresses
    • Blocked IPs Report
  • Firewall and Geo Security
    • 8G Firewall
    • Geo Security
    • Country Blocking
    • Whitelist IPs
    • Whitelist Paths
    • Blacklist IPs
    • Block User Agents
    • Block Referrers
    • Block Hostname
  • Temporary Logins
    • Global Settings
    • Create Temporary User
    • Edit Temporary User
    • Lock/Unlock Temporary User
    • Delete Temporary User
    • Copy Temporary Login Link
  • Two Factor Authentication
    • Activate 2FA Feature
    • Setting up 2FA Code Scan
    • Setting up 2FA Email Code
    • 2FA Login Monitor
    • Magic Link Login
  • Security Threats Log
    • Activate Security Threats Log
    • Reading Threats Report
    • Responding to Threats
    • GEO Threat Map
  • User Events Log
    • Activate Users Events Log
    • Log User Roles
    • Check User Events Log
    • User Events Email Alerts
  • Website Security Check
    • Run a Website Security Check
    • All The Security Tasks
  • Advanced WP Security
    • Custom Safe URL Parameter
    • Must Use Plugin Loading
    • Priority & Normal & Late Loading
    • Late Loading
    • Add Rewrites in WP Rules Section
    • Clean Login Page
    • Email Notification
    • Preset Security Options

Get Protected

  • Pricing & Plans
  • Install Free Version
  • Free vs Premium
  • Free Security Check
  • One-Click Security Presets
  • Quick Setup Guide
  • Best Practice Settings

Top Features

  • Hide wp-admin & wp-login
  • 7G + 8G Firewall
  • Brute Force Protection
  • 2FA & Passkey Login
  • Country Blocking
  • Security Headers
  • Security Threats Log
  • Temporary Logins

Resources

  • Knowledge Base
  • FAQs
  • Best Practice Guide
  • Plugin Compatibility
  • Theme Compatibility
  • Why WP Ghost
  • WordPress Security
  • Changelog

Company

  • Contact Support
  • Affiliate Program
  • Agency White Label
  • Media Kit
  • Terms of Use
  • Privacy Policy
  • About Us
© 2016 - 2026 WP Ghost. All rights reserved. Powered by AISQ.
Hide My WP uses cookies on the website to give you the most relevant experience by remembering your preferences and repeat visits.
Ok Reject
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT