As much as version control has been an integral part of the core development of WordPress for quite some time, it has never been easy to integrate proper version control into the platform. As the complexities of web development have increased, version control has become ubiquitous on both the front end and the back. But managing databases, theme files and plugin settings across distributed teams is still a challenge. That’s why developers Borek Bernard and Jan Voráček began work on VersionPress, a version control system for WordPress.
VersionPress approaches the problem by storing both your database and files in a Git repository. This allows the plugin to track every change that’s made, and easily undo or revert back to any point. And since Git keeps things fairly compact, your version control files will never be all that large. The VersionPress team is looking to crowdfund the development of the plugin. If you have any interest in combining WordPress development and proper version control, I encourage you to check out their page and donate a few bucks to the effort.
Fortunately, Borek gave me a bit of a sneak peek of VersionPress so I can see how it works. I’m happy to say the product is certainly impressive, and addresses a problem I still haven’t seen anybody solve.
VersionPress installs like any other plugin. After you install it, it proceeds through a build step which will connect your database and file system to a Git repository, and then start tracking changes immediately. From that point on, every change you make, no matter how small, will be recorded by VersionPress and stored in Git.
Accessing the VersionPress page will show you a list of activity on your site, from all users, and give you a brief summary of actions (changed post name, deleted page, etc.). For each change made, you can choose to undo this single step, meaning only that action will be undone without affecting the rest of the site. Alternatively, you can choose to revert your site back to a previous step, meaning that any changes made since that step will be undone.
When you make a change your history will not be erased. This means that even tracked changes you chose to undo will still be recorded. An undo or revert action will simply be recorded as another step, which means that everything in your version control is completely chronological, and you can restore any change you may have previously erased. You can even revert back to a state you previously reverted to.
Because of the way VersionPress connects with your database and file system, you can actually edit your site however you want, and it will still track your changes. So, if you make a change directly to your database, VersionPress will record it. If you FTP up a new plugin and install it, VersionPress will record it. It’s meant to adapt to any workflow you might have in place, and accommodate a wide variety of use cases.
VersionPress also maintains backups of your site. Again, since it uses a Git repository to store changes, it can keep backups of only what has changed, so it keeps the file size fairly small. And since the plugin tracks all of the changes you make, it makes a small backup every time something is changed instead of at regular intervals.
For now, the team is working through the basics. Ultimately, they would like to implement a full scale versioning system which allows you to seamlessly operate between your local install, staging environment and live server. It sounds bold, but the plugin itself is starting from an extremely simplistic and clever solution, making it fairly extendable and super easy to build on.
As I mentioned before, the VersionPress needs your help to make this project a realty. They are crowdsourcing funds on their website, so go check it out and donate to the plugin if you think it fits your needs.
Are you excited for a version control plugin for WordPress? Are you going to donate to the VersionPress?
Jay Hoffmann is a WordPress developer hailing from NYC. In the strictest sense of the word, he is a WordPress enthusiast with an eye for front-end development and design. He has been working with WordPress since 2006 and currently works for a popular children’s media company. This year, Jay started Tidy Repo, a curated list of the best and most reliable plugins from around the web. You can also follow Jay on Twitter.
3 Comments