Title: Moving the .git folder
Last modified: October 16, 2024

---

# Moving the .git folder

 *  Resolved [rodricus](https://wordpress.org/support/users/rodricus/)
 * (@rodricus)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/removing-the-git-folder/)
 * Hello,
 * I want to place the .git folder outside the public_html folder on my FTP-server.
 * I want to do this because it’s not safe to have .git folder in the public_html
   folder, where everyone can publicly access it.
 * Ofcourse I can block the access to the .git folder in .htaccess but I have read
   it’s safer to put the .git folder in a folder that is not publicly accessible.
 * So I put the .git folder a folder behind “public_html” and place a .git file (
   not .git folder) inside the public_html folder that is referencing to the new.
   git folder location. I also reinstalled Gitium just to be sure. But unfortunately
   this does not work.
 * Can this somehow work? If yes, how?
    -  This topic was modified 1 year, 7 months ago by [rodricus](https://wordpress.org/support/users/rodricus/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fremoving-the-git-folder%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Presslabs](https://wordpress.org/support/users/presslabs/)
 * (@presslabs)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/removing-the-git-folder/#post-18077663)
 * Hello,
 * I will ask the technical team to see what can be done.
 * Best regards,
 *  Plugin Author [Presslabs](https://wordpress.org/support/users/presslabs/)
 * (@presslabs)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/removing-the-git-folder/#post-18093116)
 * Hello [@rodricus](https://wordpress.org/support/users/rodricus/),
 * I’ve discussed internally with the team and this could get complicated because
   you will have to create symlinks for the wp-content, root files and you should
   also move the upload folder because they are present in wp-content(so you will
   have to symlink it as well). I think is best to block the access from .htaccess
   or nginx.
 * Best regards,

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

The topic ‘Moving the .git folder’ is closed to new replies.

 * ![](https://ps.w.org/gitium/assets/icon-128x128.png?rev=1610345)
 * [Gitium](https://wordpress.org/plugins/gitium/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gitium/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gitium/)
 * [Active Topics](https://wordpress.org/support/plugin/gitium/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gitium/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gitium/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Presslabs](https://wordpress.org/support/users/presslabs/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/removing-the-git-folder/#post-18093116)
 * Status: resolved