Is it possible to rename the wp-admin folder?
I know I could just rename it, but unless it's supported by the code lots of things would break.
If I use a custom folder name, it will make it slightly more secure, security by obscurity and all that.
If you'd really like to see this be revisited I'd suggest:
No, you cannot rename the folder. The path is hard-coded in multiple locations throughout WordPress' source.
Security through obscurity isn't really security anyway.
If you want to keep subscriber-level users from seeing the wp-admin directory, you can create standalone versions of the login/registration and profile/edit pages in their own directories. Then, you can protect your admin folder via htaccess or IP restriction. (Though if you do this, you should make an exception for the admin-ajax file, as some plugins use it to add, um, AJAX functionality).
This approach gives you the "obscurity" you want (which doesn't really do much, but often makes clients and managers feel better), and also adds some real security by limiting access to the admin. Plus, honestly, a URL that just says "/login" looks a lot nicer than "wp-login.php".
It should go without saying that this doesn't make your site bulletproof. But it's a nice, basic enhancement.
There is actually a very good tutorial on this here:
It explains how to change the folder name, the wp-admin login url, and make sure that login.php redirects to the main site so that people can go there directly.
An approach that is officially supported by WordPress is to move the WordPress installation files into a sub-directory, while keeping the site in the root, like so:
While this does not give you complete freedom in changing your admin url, it means you can prefix it with anything you like. This is just as good from a security point of view. It also has the benefit of moving all the WordPress installation files into a location unknown to users, so it should be part of any wordpress hardening strategy.
From the WordPress Codex: Giving WordPress Its Own Directory
Also, note that while this security scheme is called Obscure URL, it is not the same thing as security by obscurity. Obscure URL is a perfectly valid security scheme that is just as good as a password, while security by obscurity relies on using secret unproven procedures.
The same caveats apply though as with passwords: Call the custom folder something like
People keep asking this question, but people keep marking it as a duplicate. The chosen answer for this however, really isn't an answer to the question.
To rename the wordpress admin you need to take two steps.
In the following code I'm using dashboard as the name of my new wp-admin. Change dashboard in the code below to whatever you want to name your new admin.
First you need to tell wordpress you want to change the admin url.
On line 2558 wp-includes/link-template.php is the code that dertermines the admin url.
You can test to see what your new url is by doing this:
However, if you'll notice when clicking through the admin that not everything works and some of the links may give you 404 not found or something similar.
Second, change the .htaccess in your wordpress root directory and add the following in the begining before anything else.
Now, I'm not an expert when it comes to editing .htaccess so some of this might not be necessary. However, I've never found it not to work.
Here's the whole thing. Create a file and drop in your plugins folder or mu-plugins folder. (remember to change every instance of dashboard to your preferred admin url)
I haven't had any in over a year using this method. You might notice that wp-admin will still work which kind of sucks, but it's more of a precaution than anything. I had some poorly written plugins that hardcoded wp-admin in some places that wouldn't load when trying to block or redirect wp-admin. I'm sure there is a way to do this with the htaccess, but I haven't successfully figured it out. Also, this hasn't been tested on multisite or anything like that ever.
Update: Alternative Approach
This is pretty similar, but for some reason my above answer didn't work on every host I tried.
Create a file in mu-plugins folder called
Note: This approach seemed to work better on some hosts, but still had the issue of not redirecting wp-admin links to the new admin url. Here's an approach I tried below. While this below doesn't work I think it's on the right track. I'm not totally sure what hook to use. htaccess might be a better alternative but I kept getting redirect loops when I tried that way.
One way to lock down the administrative control panel is to utilize .htaccess rules. Just add an .htaccess file to the root of the wp-admin directory. After you add this file, just add the following rule to deny all IP addresses and allow only your IP:
If you want to rename the wp-admin with the aim of adding additional layer of security to your WordPress installation, you can also try the Roots / Bedrock WordPress Boilerplate. It can help isolate the web root to limit access to non-web files. It can also help in organizing/securing the whole WordPress core by putting it in its own subdirectory like renaming wp-content/ to app/ as well as these additional features:
You can also check their GitHub Repo for a more detailed usage:
Take a look at http://wordpress.org/extend/plugins/stealth-login/ this may help you out.
No it's not possible to rename the wp-admin folder with any short of code or htaccess hack,
In the past i done the same for a client by performing a complete folder search via Coda (the editor i use) for the tag "wp-admin, wp-content...etc" and i remove the "wp-" from the files.
After that you will be able to install it but:
In all the ways i don't suggest you to do something like this, leave it as is and try to implement a User Login/Register/Profile page to give your users/clients a better experience.
You can also add a Post form from the frontend so the Admin and Users with the Capabilities to write a post can do it from the frontend.
Also you can take a look for some nice plugins here that do the same with more functionality.