Customizing wp-admin page url

Hi all,

I’m trying to change the url http://example-site.dev/wp/wp-admin/ into http://example-site.dev/custom-admin.

I have tried the following:

  • Rename that /wp/wp-admin folder into /custom-admin, then finding & replacing it all, but it has proven to lose css styles and I do not wish to do alter the /wp core files
  • Adding the blocks of code from codex forums on this topic (this link takes you to one of the many pages that show the same code http://help4cms.com/change-admin-url-without-plugin/ )
  • Using WPS Hide Login Plugin

…and none of them work.
The last straw was when I tested that same plugin and it works fine on a standard wordpress site because it adheres to the standard file structure.

I am assuming there should be a bedrock way of doing this, does anyone know?

Thanks in advance

1 Like

Could I ask why you want to do this?

For branding purposes & security reasons.

Hi there,

Did you find out how to achieve it?

Thanks;

Not to bump too hard - but wondering if there is any solution to the above for Bedrock/Roots users?

+1 to this. Curious to know possible to change wp-admin url without breaking anything.

iThemes Security plugin has a built-in feature for this! Can’t remember if you can also get rid of the /wp/ though…

Hello, guys. Struggling with this as well. Has anyone found the answer for it?

That’s obscurity, not security. I’m not saying obscurity is bad, but it’s not the same thing as security.

1 Like

obscurity IS security. The fact that every single bot knows what the wp login url is is a security issue at this point. His point is valid. It should be a part of standard practice to be able to change the default url for login to WP sites.

This is a feature that Roots really needs to look into. Using alternate plugins is not an ideal solution at all.

1 Like

Still no suggestions for solution here?

We hold the opinion that this isn’t something that should be modified. There’s several ways to lock down the wp-admin or the login page that don’t involve trying to rename the wp-admin directory.

I’d suggest you raise these concerns with WordPress core — I’m certain there’s at least one discussion about this on WordPress Trac

I recommend iThemes for the ability to hide backend and much more.

But also worth noting that if you used Valet or Valet-plus for local dev you may experience issues reaching the URL while iThemes was active.

Until recently I just deactivated it, but I figured out what was wrong and the latest Valet should work and for valet-plus you could patch it with the PR I created for them
Fix bedrockvaletdriver by EHLOVader · Pull Request #1289 · laravel/valet · GitHub or Fix bedrockvaletdriver by EHLOVader · Pull Request #612 · weprovide/valet-plus · GitHub

the additional /wp/ can be handled with an .htaccess rewrite or nginx config I’m sure

I had this from before, but I still usually forget to add it and just use wp/hidden-admin (no not my real path, I’m not telling you that)

<IfModule mod_rewrite.c>
# Enable the hide backend feature - Security > Settings > Hide Login Area > Hide Backend
        RewriteRule ^(/wp/)?hidden-admin/?$ /wp/wp-login.php [QSA,L]
        RewriteRule ^(/wp/)?wp-register-php/?$ /wplogin?action=register [QSA,L]
</IfModule>
1 Like

Sorry, still no solution? :grimacing: