This month we featured a project called VersionPress that brings version control to WordPress, a concept that has many in the community excited. The VersionPress development team is seeking $30,000 in funding by the end of June in order to get it off the ground. However, they aren’t the only ones working on adding git-based version control to WordPress.
Earlier this month, developer Matt Shaw quietly released Revisr on WordPress.org. Revisr is a plugin that allows developers to synchronize with any Git repository and easily commit, push, pull, and branch changes from within the WordPress admin. It’s different from VersionPress in that it’s designed to integrate with a remote repository, ie. one hosted on GitHub or Bitbucket. Unlike VersionPress, which hasn’t yet met its funding goals, Revisr is free and available now.
The plugin allows you to manage your WordPress website with a git repository and currently includes the following features:
- Track changes to the files and database of your WordPress installation
- Optionally use different database versions for each branch
- Commit and push changes to a remote repository (including Bitbucket and Github)
- Pull changes down from a remote repository
- Easily toggle between branches
- Revert your website files and/or database to an earlier commit
- Discard any unwanted changes
- Manage .gitignore to prevent unwanted files/directories from being tracked
“I made Revisr to simplify the development process,” Shaw told the Tavern. “There are currently no plugins on WordPress.org that allow developers or site admins to use all of the main features of Git through the WordPress dashboard, and I made Revisr to do just that,” he said.
“At the same time, I wanted it to be simple enough so it could be used by people who aren’t necessarily interested in Git, but are interested in having backups and being able to quickly revert changes if needed.”
For the sake of user-friendliness, Revisr includes an interface in the admin for committing, reverting, pushing and pulling changes:
Revisr makes it easy to view changes in files:
A commit history for the site is available in the WordPress admin:
How to Set Up Revisr
The plugin has three requirements:
- A WordPress installation in the root folder of a Git repository
- Git must be installed on the server (most updated versions of cPanel have it preinstalled)
- PHP exec (safe mode off, can be configured in your php.ini)
If you want to use Revisr with an existing site, you must ensure that the “.git” directory is in the root directory of the WordPress installation. The plugin will then attempt to use the settings stored in Git for pushing to/pulling from any remote repositories, which can be defined on the plugin settings page. Revisr supports git through SSH or HTTPS:
If you’re using SSH for authentication, you will need to generate an SSH key and add it to Bitbucket/Github.
The process for setting up a new installation with Revisr is fairly easy:
- Create the repository on Bitbucket or Github
- Clone the repository to your computer, add WordPress, and push it to the repository.
- Upload the entire repository to the server, install WordPress, and add Revisr
Benefits of Using Revisr: Revision Tracking, Branching, and Backups
Matt Shaw believes that Revisr can benefit WordPerss admins in several ways in addition to revision tracking. “Revisr helps the admins see all files that have been changed and the specific changes within those,” he said. “This is an advantage if many files need to be modified and helps to keep issues at a minimum. An added benefit is having backups and being able to quickly spot and revert some website hacks if they occur.”
“Branching also enables site admins to easily test theme changes or new functionality and quickly toggle back and forth between different versions of the site,” Shaw noted. “For example, a site admin could create a new branch to preview layout changes, and switch back to the original branch and old layout if needed.”
Recent updates to the plugin include the option to keep the database separate between branches. This allows users to go back and restore the database from any commit in which the database was also backed up.
Since Revisr tracks both database and file changes, it is suitable for keeping a complete backup of the site. Site admins can easily make full restore points before major changes such as a WordPress core or plugin upgrade.
In the next major update, Shaw plans to give admins more control on what gets committed and reverted, allowing specific files to be reverted without affecting the overall project. He also plans on adding the ability to tag commits with a version number and the ability to view/merge changes between branches. Future versions of the plugin will include the ability to merge changes between branches and the ability to schedule backups of both the website files and database.
The Future of the Revisr Plugin
I asked Shaw about the future of the plugin and if he plans on monetizing it. “The plugin will always be completely free and open source,” he replied. “We are also working on a paid standalone application that can interface with Revisr that will allow teams and web firms to manage multiple websites using Git. However, the full functionality of the plugin will always be free.”
Shaw is working with a team that aims to launch Revisr Pro, a paid application, later this year. Revisr Pro will work with any type of project, but it will also be able to interface with the Revisr plugin via an API to add more features to both the plugin and the standalone application. “It’s designed to simplify managing large amounts of websites (20+) with multiple environments, with file and database tracking with Git, project-level tasks, and team support,” Shaw said. “Revisr Pro is also able to deploy and configure new projects, simplifying the workflow for teams using Git, and allowing more time to be spent focused on the project itself.” They plan to feature straightforward pricing, and won’t charge for additional users or projects.
Shaw is currently the sole developer on the Revisr WordPress plugin project, although he has friends who are helping out with testing and design. His plugin is different from VersionPress in that it isn’t targeted toward bringing version control to the masses. Revisr is geared more toward developers and isn’t supported by a crowd-funding campaign. Shaw is just one man working to create a plugin that helps improve his own workflow. You can download Revisr on WordPress.org and watch for updates as the plugin continues to develop.
This is awesome! I really liked the idea behind VersionPress, let’s see what features do these guys cover already with Revisr! :)