Why Do I Get a 404 Error on My Custom Admin URL?

Moved

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

View on new site

This is expected behavior, not an error. When the Hide “wp-admin” option is enabled in WP Ghost, the custom admin path is only accessible to logged-in users. If you try to visit your custom admin URL without being logged in first, WP Ghost returns a 404 to prevent bots from discovering the admin area. The solution is simple: go to your custom login path first, log in, and then access the admin URL.

Why the 404 Happens

WP Ghost’s admin path protection works by requiring authentication before granting access. When you enable Hide “wp-admin” in WP Ghost > Change Paths > Admin Security, WP Ghost blocks all unauthenticated access to both the default /wp-admin and your custom admin path. This is a security feature: if the custom admin URL were accessible to non-logged-in visitors, bots could discover it by scanning and then target it with exploits. By returning a 404 to unauthenticated requests, WP Ghost ensures the admin area is truly hidden.

How to Access Your Admin Dashboard

Instead of going directly to the admin URL, follow this process. Navigate to your custom login path first (the URL you set in WP Ghost > Change Paths > Login Security). Log in with your credentials. After successful authentication, WordPress automatically redirects you to the admin dashboard at the custom admin URL. From that point on, the custom admin path works normally for the rest of your session because you have a valid authentication cookie.

If you have bookmarked your custom admin URL, update the bookmark to point to your custom login URL instead. The login page is your entry point. The admin URL is accessible only after authentication.

Alternative: Allow Admin Path Without Login First

If you prefer the custom admin path to redirect non-logged-in visitors to the login page instead of returning a 404, go to WP Ghost > Change Paths > Admin Security and switch off Hide “wp-admin”. With this off, visiting the custom admin URL while not logged in will redirect you to the login page automatically. This is more convenient but slightly less secure, since the redirect confirms the admin path exists. For maximum security, keep Hide “wp-admin” enabled and always access the dashboard through the login path.

If You Are Locked Out Entirely

If you cannot remember your custom login path or cannot access the dashboard at all, WP Ghost provides multiple recovery methods. Use the Safe URL parameter to bypass all path changes for a single request. Use the Pause 5 Minutes button on the Plugins page if you can reach it. Or disable WP Ghost via FTP by renaming the plugin folder or adding define('HMWP_DISABLE', true); to wp-config.php. For the full recovery guide, see the Emergency Disable tutorial.

Frequently Asked Questions

Is the 404 on the admin path a bug?

No. It is the intended behavior of the Hide “wp-admin” feature. The 404 prevents bots and unauthenticated visitors from discovering your admin URL. Log in through your custom login path first, and the admin URL works normally.

Will this affect other logged-in users like editors or authors?

Any logged-in user with dashboard access can reach the admin URL after authenticating through the login page. If you have also enabled “Hide wp-admin from Non-Admin Users,” then only administrators can access the admin path. Other roles are redirected away. See the Change wp-admin Path tutorial for role-based configuration.

I get a 404 even after logging in. What should I do?

Log out and log back in so WP Ghost creates a fresh session for the custom admin path. Clear your browser cache and cookies. If the issue persists, try a different browser or incognito window. If none of these work, the server may not be processing WP Ghost’s rewrite rules correctly. Check the Admin Path Redirected to Front Page troubleshooting guide.

Does WP Ghost modify WordPress core files?

No. The admin path is hidden through server rewrite rules and session detection. No files or directories are renamed. Deactivating WP Ghost restores normal access to /wp-admin instantly.