Title: Changing Working Directory
Last modified: August 30, 2016

---

# Changing Working Directory

 *  Anonymous User 6666466
 * (@anonymized-6666466)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/changing-working-directory/)
 * Hello,
 * I have the following directory structure.
 * /home/web/public_html <- WordPress installation
    /home/web/.git <- Git directory
 * I have the following in wp-config.php
 * define(‘REVISR_GIT_DIR’, ‘/home/web/.git’);
 * And the following in my .git/config file
 * worktree = /home/web/public_html
 * Just wondering why revisr is showing
 * Work Tree: /home/web
    Git Dir: /home/web/.git
 * How do I change the Work Tree? I’m probably doing something stupid, but I googled
   a bunch and tried to search these threads.
 * Thanks
    -J
 * [https://wordpress.org/plugins/revisr/](https://wordpress.org/plugins/revisr/)

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

 *  Plugin Author [Matt Shaw](https://wordpress.org/support/users/mattshaw/)
 * (@mattshaw)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/changing-working-directory/#post-6793753)
 * Hi Jordan,
 * You can change the Work Tree by adding this to your wp-config:
 * `define( 'REVISR_WORK_TREE', '/path/to/your/work/tree' );`
 * Let me know if that helps!
 *  Thread Starter Anonymous User 6666466
 * (@anonymized-6666466)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/changing-working-directory/#post-6793768)
 * Thanks Matt, added it to my wp-config.php and even deleted revisr and installed
   it again.
 * Still not working 🙁 I was peeking around some code and I think this variables
   is overwritten somewhere.
 *  Plugin Author [Matt Shaw](https://wordpress.org/support/users/mattshaw/)
 * (@mattshaw)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/changing-working-directory/#post-6793769)
 * Hi Jordan,
 * I looked into this and the only way the REVISR_WORK_TREE variable could be overwritten
   is if the directory you defined doesn’t exist (or if you didn’t define it at 
   all).
 * In either case, it will default to the value of the WordPress ABSPATH constant.
 * Just out of curiousity, is your wp-config.php file in the /home/web/ directory?
   Or in /home/web/public_html/?
 *  Thread Starter Anonymous User 6666466
 * (@anonymized-6666466)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/changing-working-directory/#post-6793788)
 * Yea Matt, I was poking around briefly and saw that the variable was being overwritten
   at some point.
 * Just recap.
 * /home/web/public_html < WordPress Install
    /home/web/public_html < wp-config.
   php with Revisr settings /home/web/.git < git local repository and config.
 * Also, I typically start tracking sites using the following method.
 * cd /home/web/public_html
    git –git-dir=../.git –work-tree=. init
 * I started to move towards this, versus having the .git folder in the wordpress
   installation directory due to plugins scanning the .git dir and taking forever.
 *  Thread Starter Anonymous User 6666466
 * (@anonymized-6666466)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/changing-working-directory/#post-6793789)
 * Matt, just did this setup on a existing WordPress site that had no git repository
   or revisr plugin install.
 * Setup git repository /home/web/.git and set work-tree to /home/web/public_html
   in .git/config
 * Installed revisr, couldn’t find repository. Updated wp-config.php to add
 * define(‘REVISR_GIT_DIR’, ‘/home/web/.git’);
 * Found repository, and detected the working tree correctly as /home/web/public_html
   under Help.
 * So strange…..

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

The topic ‘Changing Working Directory’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/revisr_ecf0f1.svg)
 * [Revisr](https://wordpress.org/plugins/revisr/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/revisr/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/revisr/)
 * [Active Topics](https://wordpress.org/support/plugin/revisr/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/revisr/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/revisr/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: Anonymous User 6666466
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/changing-working-directory/#post-6793789)
 * Status: not resolved