Setup a New Repository

If you don’t already have your WordPress installation in a Git repository, Revisr is able to create a new one for you. To do this, follow these simple steps:

  1. After installing Revisr, go to the Revisr Dashboard page via the WordPress admin menu
  2. You will see a message saying that Revisr could not detect a repository
  3. Click the link to create a new repository

Once you click the link to create a new repository, Revisr will automatically initialize a new Git repository in the root directory of your WordPress installation. If you want to change the root directory that the repository is created in, you can place the following constant in your wp-config.php to override the path:

define( 'REVISR_GIT_DIR', dirname( __FILE__ ) );

Make sure that you place the above code above the line that starts with “Absolute path to the WordPress directory”. (Just below the the “WP_DEBUG” constant should work well).

The above example would set the REVISR_GIT_DIR to the same directory as your wp-config.php file.

You will then be redirected to the Revisr settings page, to confirm the base configuration that Revisr setup for you. If all looks good to you, save the settings to confirm and you’re ready to make your first commit.

Last updated on January 13, 2017