Installing WordPress VersionPress Plugin

Discussion in 'WordPress Guides' started by Chuck, Nov 12, 2017.

  1. Chuck

    Chuck Administrator
    Staff Member Grep What?

    Joined:
    May 17, 2017
    Messages:
    39
    Likes Received:
    0
    VersionPress is an awesome tool for development and even backups and recovery. I have written a blog post on it here: Easy Staging With VersionPress

    First install it, I won't explain this. Simply add it from your WordPress dasboard :) Now in the above article I mention there are two ways to fix VersionPress when it sees the incorrect GIT version both of them may be required. Try the easiest one first.

    Add the following to your wp-config.php file:

    Code:
    define('VP_GIT_BINARY', '/usr/local/cpanel/3rdparty/bin/git');
    If VersionPress still sees the wrong version move this line up so if possible it is the first active line in your config file:

    Code:
    <?php
    /**
     * The base configuration for WordPress
     *
     * The wp-config.php creation script uses this file during the
     * installation. You don't have to use the web site, you can
     * copy this file to "wp-config.php" and fill in the values.
     *
     * This file contains the following configurations:
     *
     * * MySQL settings
     * * Secret keys
     * * Database table prefix
     * * ABSPATH
     *
     * @link https://codex.wordpress.org/Editing_wp-config.php
     *
     * @package WordPress
     */
    
    /** VP GIT Version Fix */
    define('VP_GIT_BINARY', '/usr/local/cpanel/3rdparty/bin/git');
    
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'database_name_here');
    The alternative is to create an Alias in SSH. Login to your account via SSH and issue the following command:

    Code:
    echo 'alias git="/usr/local/cpanel/3rdparty/bin/git"' >> ~/.bashrc
    source ~/.bashrc
    Check if it has the desired effect:

    Code:
    git --version
    You should now have full functionality of VP, wp-cli, and GIT whether it be from commandline or WordPress plugin.
     
    #1 Chuck, Nov 12, 2017
    Last edited: Nov 17, 2017

Share This Page