How to Change and Hide the wp-admin Path in WordPress with WP Ghost

This tutorial has moved to the new WP Ghost Knowledge Base where each feature is presented in detail.
Protect your WordPress dashboard by changing and hiding the wp-admin path with WP Ghost (formerly Hide My WP Ghost). The default /wp-admin URL is one of the first paths bots probe on any WordPress site. Change it, and the bots that only know the default URL get a 404 error.
WordPress runs 39.5% of all websites (W3Techs, November 2026). Every one of them uses the same default admin URL: /wp-admin. Bots don’t need to guess where your dashboard is, so /wp-admin is one of the first URLs every scanner probes.
WP Ghost lets you change the wp-admin path to any custom name, hide it completely from visitors and bots, and restrict it to administrators only. All changes use rewrite rules. No WordPress core files are modified.
Why you need to secure the wp-admin path
| Default wp-admin (exposed) | With WP Ghost (secured) |
|---|---|
| Every bot knows the exact URL | Custom URL only you know |
| Brute force attacks target it directly | Bots get a 404 error, attack fails |
| All logged-in users can access it | Logged-in non-admin users get a 404 on /wp-admin |
| Confirms WordPress to scanners | Admin path invisible in source code |
How to change and hide wp-admin with WP Ghost
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 applies the basic path changes and is the recommended starting point. Ghost Mode adds advanced path security including wp-admin and admin-ajax.php path changes. If you are unsure, start with Safe Mode. You can upgrade to Ghost Mode later.

Not sure which mode fits your site? See the Safe Mode vs Ghost Mode comparison.
Change the wp-admin path
Go to WP Ghost > Change Paths > Admin Security. Enter a custom name in the Custom Admin Path field. Click Save.

Avoid common words like “login”, “admin”, “backend”, or “dashboard” for your custom path. Bots try these variations by default. Use something unique, like a combination of random words.
Not all hosting environments handle custom admin paths the same way. If you are on a managed host like WP Engine or Kinsta, check the hosting compatibility guides.
Hide wp-admin from visitors and bots
Changing the path gives you a new URL, but the original /wp-admin may still be accessible. The Hide “wp-admin” option makes the old path return a 404 error for anyone who is not logged in.
Go to WP Ghost > Change Paths > Admin Security. Switch on Hide “wp-admin”. Click Save.

Once activated, any bot or visitor hitting /wp-admin gets a dead end. Only users who are already logged in through the custom login path can reach the dashboard.

Hide wp-admin from non-admin users
By default, every logged-in WordPress user (editors, authors, subscribers, customers) can open /wp-admin. With this option, logged-in users who are not administrators get a 404 error when they type /wp-admin. Administrators keep their access.
Go to WP Ghost > Change Paths > Admin Security. Switch on Hide “wp-admin” From Non-Admin Users. Click Save.

This is especially useful for WooCommerce stores, membership sites or any WordPress site with several user roles. Customers and subscribers who type /wp-admin see a 404 page, not a WordPress dashboard. The option works once you change the admin path to a custom name.
Verify with a Security Check
After making your changes, run a security scan to confirm everything is working. Go to WP Ghost > Security Check. Click Start Scan. The scan will confirm if the wp-admin path is hidden and highlight any remaining security issues.

Troubleshooting
Custom wp-admin path causes plugin or server issues
Some plugins and hosting environments do not support custom wp-admin paths. If you experience issues after changing the path, try these steps in order:
Use the default wp-admin path with Hide enabled. Revert the custom path back to “wp-admin” but keep the Hide “wp-admin” option active. This gives you the security benefit (404 for non-logged-in users) without the compatibility risk of a custom path name.
Check plugin compatibility. Deactivate other plugins one by one to identify if a specific plugin is causing the conflict. Some plugins hardcode the /wp-admin path. Check the Compatibility Plugins List for known issues.
Contact your hosting provider. Managed hosts like WP Engine use Nginx path redirection instead of rewrite mapping. On these servers, keep the default wp-admin path and use the Hide option instead of a custom name. On WP Ghost Premium 9.0.13 or later, run Ghost Doctor before you contact the host: press Start Diagnosis on the Level of Security page. It finds which path your server stopped serving and repairs it.

Cannot log in after hiding wp-admin
If you customized the wp-admin path and enabled Hide wp-admin, you need to use your custom path to reach the dashboard. If you forgot the custom path, use the Safe URL parameter to bypass WP Ghost temporarily. If that does not work, see the Emergency Disable guide for FTP-based recovery.
Frequently asked questions
Does changing the wp-admin URL actually improve security?
Yes. Most WordPress attacks are automated. Bots are programmed to target /wp-admin and /wp-login.php by default. When these paths return a 404, the bot moves on to the next target.
Will changing the wp-admin path break my plugins?
Most plugins work correctly with custom paths. Some plugins hardcode /wp-admin and may not function properly. If you experience issues, keep the default wp-admin path and use the Hide option instead. Check the Compatibility Plugins List for known conflicts.
What if I forget my custom admin 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.
Does this work with WooCommerce?
Yes. WP Ghost is fully compatible with WooCommerce. Customer-facing pages like shop, cart, checkout, and my account are not affected by admin path changes.
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 Login Path: hide wp-login.php, 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.
Rollback Settings: recover access if path changes cause issues.
Website Security Check: verify your configuration after making changes.