Category Archives: Student Questions

Version Control in WordPress

Someone recently emailed me with a “help, I broke my website” kind of question so I just wanted to go through some version control options in WordPress. Version control simply means creating redundancy in your design process so that you don’t lose your work. It’s the Word Autosave feature, just for web design.

The nice thing about designing with a CMS is that there is lots of redundancy built in.

First off, any theme you alter the code for still resides within the WP database, so if you break it, all you have to do is reinstall it.

It’s also a best practice, however, to create a child theme for the theme you’re working on, because otherwise, when you update the theme you’re using, you will lose all your custom code. You can also simply never update your theme, but there are other benefits to creating a child theme, such as ensuring that you don’t ever accidentally update over it (there’s no other version to update to).

Finally, every piece of content you create in WordPress (including this post right now) gets autosaved, much like Word. When creating a post or page you can save a draft, and can even see any revisions you make to it, all under the “Publish” box on the upper right-hand side of the Posts dashboard.

I also personally prefer to save any custom code I put anywhere in a Google Doc . That way I’ve got everything I’ve added when working on a site, in case something unexpected happens.