Title: htaccess question for wp-admin folder
Last modified: January 19, 2017

---

# htaccess question for wp-admin folder

 *  Resolved [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/htaccess-question-for-wp-admin-folder/)
 * Can I use this in htaccess file to change wp-admin folder to another name?
 * `RewriteRule ^newfoldername/(.+) /websitename/wp-admin/$1 [L,QSA]`
 * Basically taking wp-admin folder and naming it newfoldername… would there be 
   any side effects like losing edit links or what not?
 * Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/htaccess-question-for-wp-admin-folder/#post-8672185)
 * Well, I tried a few things, an nothing seems to work 🙁
 * Any suggestions? I am using ajax, so when I call it for the theme `admin_url(
   admin-ajax.php)`, well, wp-admin shows on code… its the last thing to totally
   hide WP.
 * Thanks in advance for any suggestions.
 *  Plugin Contributor [Maya](https://wordpress.org/support/users/tdgu/)
 * (@tdgu)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/htaccess-question-for-wp-admin-folder/#post-8673392)
 * I’am not sure if i understand this correctly but you want to add a custom rewrite
   rule within your .htaccess file, to change your default wp-admin folder?
    But
   the plugin already support that functionality, see WP-Hide > Admin > Admin Url.
   For more details see this article [http://www.wp-hide.com/documentation/admin-change-wp-admin/](http://www.wp-hide.com/documentation/admin-change-wp-admin/)
 *  Thread Starter [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/htaccess-question-for-wp-admin-folder/#post-8673669)
 * Ah, I see. Let me give that a run tonight… Update with results.
 * Thank you!
 *  Thread Starter [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/htaccess-question-for-wp-admin-folder/#post-8673820)
 * I tried it — yes, this is what I was seeking to do… And it did work at face value,
   that is to say, wp-admin did change to new-folder-name — except as administrator
   I couldn’t get into the admin pages. I tried my new folder name in url and that
   didn’t work either 🙁
 * Any suggestions?
 * Thank you very much!
 *  Thread Starter [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/htaccess-question-for-wp-admin-folder/#post-8673827)
 * Ah, I bet I have some obscure code in the the theme that’s messing with your 
   intentions. I will investigate tonight and update. But feel free to throw out
   some ideas in case I am wrong.
 * Thanks!
 *  Plugin Contributor [Maya](https://wordpress.org/support/users/tdgu/)
 * (@tdgu)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/htaccess-question-for-wp-admin-folder/#post-8674022)
 * This should work fine, i suggest so you try with a dummy WordPress instance (
   no other active plugins and a default theme) to make sure it run fine on your
   server environment. Then you can go further and see what cause any conflicts.
 *  Thread Starter [JJNW](https://wordpress.org/support/users/jjnw/)
 * (@jjnw)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/htaccess-question-for-wp-admin-folder/#post-8676796)
 * Okay, finally figured it out — NEED to clear out CACHE and restart browsers. 
   I tried it on Safari, Chrome and Firefox – all work now 🙂 BRILLIANT plugin, 
   man, seriously! Thank you so much for the plugin and support!
 * I did only add this last piece of code in functions.php to really give it the
   final touch:
 *     ```
       /* when logged out redirect to homepage */
       function logout_redirect_home(){
       	wp_safe_redirect(home_url());
       	exit;
       }
       add_action('wp_logout', 'logout_redirect_home');
       ```
   
 * Again, THANKS!!!!!!!!!!!!!!!!!!!!!! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘htaccess question for wp-admin folder’ is closed to new replies.

 * ![](https://ps.w.org/wp-hide-security-enhancer/assets/icon-256x256.png?rev=2937681)
 * [WP Hide & Security Enhancer](https://wordpress.org/plugins/wp-hide-security-enhancer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-hide-security-enhancer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-hide-security-enhancer/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-hide-security-enhancer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-hide-security-enhancer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-hide-security-enhancer/reviews/)

## Tags

 * [htaccess](https://wordpress.org/support/topic-tag/htaccess/)

 * 7 replies
 * 2 participants
 * Last reply from: [JJNW](https://wordpress.org/support/users/jjnw/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/htaccess-question-for-wp-admin-folder/#post-8676796)
 * Status: resolved