One important trend surfacing this year is WordPress developers’ growing desire to add git-based version control to their sites. It adds an extra layer of safety in case you need to revert changes. Version control also helps multi-person teams work together more efficiently on the same website.
Several plugin options are in the works in varying stages of development. While VersionPress missed its crowdfunding goal by $14.5K and struggles to put out a working prototype, the Revisr plugin is open source and already available on WordPress.org.
Gitium is a new plugin in beta, targeted specifically at adding version control for plugins and themes. It enables continuous deployment for WordPress and integrates with Github, Bitbucket, or Travis-CI.The plugin provides automatic git version control and deployment for WordPress extensions and also tracks code edits that originate in the plugin and theme editors.
Gitium was built by the folks at PressLabs, a Romanian-based WordPress hosting company. It requires the git command line tool (minimum version of 1.7) installed on the server and the proc_open PHP function enabled.
Gitium installs like a normal plugin and the settings page prompts the user to provide a URL for remote access to a Git repository via SSH, HTTPS, or Subversion. If you use GitHub or Bitbucket, you will need the key issued by Gitum for SSH key-based authentication to allow write access to your repository.
Once configured, Gitium will monitor when you add, remove, update or change files in a plugin or theme. The plugin sets the WordPress logged-in user as the author of the commits. It allows for staging and production to follow different branches of the same repository. Code can be deployed using
git push. In the event of a conflict, Gitium will overwrite the changes on the origin repository with the local changes- local modifications will always take precedence over remove ones.
Ordinarily, most of the code changes on a WordPress site happen within the context of plugins and themes. Gitium allows you to keep track of who changed what. At the moment, the plugin does not support WordPress multisite or submodules. If you need to track changes in both the files and database of your site, then Revisr might be a more suitable option for adding git-based version control to your site.