Monday, April 13, 2020

Beginners Guide to WordPress Version Control - 2 Ways to Start

For developers, version control is a staple of managing code. But now, some plugins have made this once-complicated concept available to regular WordPress users. Today, whether youre a developer or a regular WordPress user, you can use WordPress version control to track changes to your site and keep your data safe.In this post, well give you a brief introduction to the general concept of version control and then get into some WordPress version control plugins that make it easy for your to track changes to your WordPress site and its code base. Beyond that, version control also allows multiple people (often geographically separated) to work on the same set of files at the same time.Most of the time, WordPress version control is focused on the first point (creating checkpoints).There are many version control systems, each with its own set of pros and cons. And while each has its own interface, the core concept  of data management through regular backups and restores is the same.Gener ally, there are two sets  of data you want to control with WordPress:FilesDatabaseTo make the process as simple as possible, you should just use your entire WordPress directory as your file base. And you should also take periodic backups of your database to keep multiple versions.The main value of why you should consider experimenting with version control is this:Enabling WordPress version control ensures that your data is safe * and you also have access to older versions of your site. In case you find  any errors on your website, you can safely roll back changes to an older version  thanks to WordPress version control.For example, even if you follow all update best practices, things can still go wrong. Thats why version control can be so helpful! *  To be absolutely safe, you need to keep offsite backups. Otherwise, even WordPress version control cant save you if a virus wipes out your entire server.WordPress version control with Revisr Revisr Author(s): Expanded Fronts, LLCCurrent Version: 2.0.2Last Updated: December 13, 2018revisr.zip 92%Ratings 33,039Downloads 3.9.2Requires Revisr is a WordPress version control plugin that lets you manage your WordPress files and database directly from your WordPress dashboard. In order to fully understand the plugin, you should probably go through the  basics of Git  first (the next plugin we feature is a bit more beginner friendly).When you install and activate Revisr, it shows you the status of your current repository. But Git isnt tracking any files yet.  You first need to select the files you want to track, stage them, and then commit them. You may want to skip your uploads folder  as Git is not very efficient at handling non-text files.Imagine a commit as a snapshot of the state of your project. Once a commit is created, it enables you to revert  to that state of your project at a future date. You can create a detailed commit message to identify a commit. At the system level, a commit is ide ntified by a large hexadecimal number, called the commit hash. These terms are a little complex so again, the next plugin offers a simpler way.Revisr also supports branching in Git. Branching in Git enables you to create divergent workflows from a common point in history, identified by a commit. Branching is especially useful when you want to try out an experimental change, but may want to revert back to the original state if it fails or in case of an emergency.Further, once you have set up Revisr and Git on your local machine, you can send the whole repository to the cloud using the push feature.One word of caution when using Revisr. Upon  creating a Git repository in your root directory, Revisr automatically creates a .git directory that  contains all the information about your repository and its changes. Make sure this directory is inaccessible on your site, as a potential attacker can gain unhindered access to your project in that case.WordPress version control with Version PressAt this point, you might realize that Revisr does a lot of what Git already does.  Why, then, do you need a second plugin? Well, Revisr may end up being a bit too complicated for the beginner, which is why the creators of VersionPress decided to make things simpler in a few different ways.VersionPress documents each change and lets you roll back.Once active, VersionPress tracks every change in WordPress like version control tracks changes to files in a repository. Unlike Revisr, it does not require you to make commits, but automatically does so after every change.For instance, when you create a post or install a plugin, VersionPress tracks it. For every change that it documents, VersionPress gives you an option to either undo an action without affecting other actions or roll back to the stage before  you performed the action.Final thoughtsWordPress version control is a great way to keep track of your WordPress sites code and get easy snapshots that you can revert to if nece ssary. But which of these two version control plugins should you actually pick? WellIf youre already familiar with Git and version control,  you should be good with Revisr.If youre new to the concept and have never pushed a Git commit, then you should definitely go with VersionPress because its more beginner friendly than Revisr. Beginner's guide to #WordPress version control - 2 ways to start Click To Tweet Did you try these tools? Do let us know in the comments below.Free guide5 Essential Tips to Speed Up Your WordPress SiteReduce your loading time by even 50-80% just by following simple tips.