• Resolved AnnasGourmetGoodies

    (@annasgourmetgoodies)


    I’m thinking of moving the default path for the .git repository out of my WordPress directory.

    Can you confirm what this should be in my wp-config.php file if I want the path to be /svr/git/wordpress ?

    Here is the line from the documentation:
    define( ‘REVISR_GIT_DIR’, dirname( __FILE__ ) );

    I tried
    define( ‘REVISR_GIT_DIR’, dirname(/svr/git/wordpress) );
    and it stopped the site from displaying any content. Yes, I gave Apache permissions to that directory first.

    Thanks

    https://www.ads-software.com/plugins/revisr/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter AnnasGourmetGoodies

    (@annasgourmetgoodies)

    I also tried this:
    define( ‘REVISR_GIT_DIR’, ‘/srv/git/wordpress’ );

    It fixed the display issue, but the repository was still created in the default WP directory.

    Plugin Author Expanded Fronts

    (@expandedfronts)

    Hi,

    It looks like the first one might have been a syntax issue (missing quotes and extra foward slash?).

    Are the WordPress files in the “wordpress” directory? If so, you could set it to “/srv/git/” and it would create the repo with the following path “/srv/git/.git”.

    Thread Starter AnnasGourmetGoodies

    (@annasgourmetgoodies)

    Yes – the folder that WP was installed in was ‘/wordpress/’.

    I added this line to my wp-config.php file before I installed Revisr:
    define( ‘REVISR_GIT_DIR’, ‘/srv/git/wordpress/’ );

    expecting the the repository would be:
    /srv/git/wordpress/.git

    I installed Revisr and created a repository. It put it in the default folder where WP is installed:

    /var/www/html/wordpress/.git.

    I did not get any error messages and Apache has full rights to this directory.

    Can you check this on your server and verify it is working?

    I’m running WP 4.22 and Revisr 1.95.

    Thanks

    Plugin Author Expanded Fronts

    (@expandedfronts)

    Hi,

    Thanks for the additional info. I did check that functionality and it’s working as expected for me, even when setting it to a different directory outside of anything related to WordPress.

    If you’re OK with debugging this further, temporarily adding the following to your theme’s functions.php should show you the path that Revisr is trying to create the repository at (and by extension, if the REVISR_GIT_DIR constant is working as expected for your environment):

    var_dump( revisr()->git->get_git_dir() );

    Alternatively, feel free to shoot an email to [email protected] if you want me to take a look at it in further detail. Thank you.

    Thread Starter AnnasGourmetGoodies

    (@annasgourmetgoodies)

    I was able to get it to work properly after moving the statement in wp-config.php above the absolute path definition. I put it just under WP_DEBUG and it worked fine.

    Thanks

    Plugin Author Expanded Fronts

    (@expandedfronts)

    Glad you were able to get this resolved – I’ve updated the documentation to reflect the proper placement.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Confirm syntax for repository path’ is closed to new replies.