Title: htaccess placement
Last modified: June 1, 2018

---

# htaccess placement

 *  [gpalz](https://wordpress.org/support/users/gpalz/)
 * (@gpalz)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/htaccess-placement/)
 * Hello Forum Members.
 * I recently launched my first WP site. I installed WP into a subdirectory while
   I was building it and updated the htaccess in the subdirectory to protect the
   WP install from prying eyes.
 * Instead of moving the WP subdirectory install into the root, I modified the site
   address under settings and copied index.php from the subdirectory into the root
   and everything is working fine. Yay!
 * Question 1: Do I need to move/copy the htaccess file from the subdirectory with
   my security settings(ie protecting htaccess, wp-config, directory browsing) into
   the root or is it fine to leave it in the subdirectory?
 * Question 2: I do have a htaccess in the root that WP probably generated after
   I changed the site address in settings, but the root version has no security 
   settings. Is this a security problem?
 * Thank you for your time and words.

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

 *  [Anass Rahou](https://wordpress.org/support/users/ranss/)
 * (@ranss)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/htaccess-placement/#post-10347982)
 * Hello there!
 * If you have any doubt about the placement of your _.htaccess_ file, just access
   to your installation folder, delete the existent file of _.htaccess_ and, from
   the dashboard, go to the Settings >> Permalinks page and hit the blue button 
   to generate a new _.htaccess_ file.
 * If you have any additional hacks that you need to add into that archive, just
   open it and past it there.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [7 years, 11 months ago](https://wordpress.org/support/topic/htaccess-placement/#post-10348724)
 * Side note: Moved to Fixing WordPress, this is not a Developing with WordPress
   topic.

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

The topic ‘htaccess placement’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/htaccess-placement/#post-10348724)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
