Websites and Tech

Version Control

Also called Git, source control

A system recording every change to a site's code, so any earlier version can be compared or restored.

Quick facts: Version Control

Category
Websites and Tech
Also called
Git, source control
Level
Intermediate
Affects
Release safety, developer handover, accountability, deployment
Where to see it
Git, GitHub, GitLab, Bitbucket
In this article4
  1. How version control works
  2. Why version control matters
  3. Common mistakes with version control
  4. How to act on it

How version control works

A version control system keeps the full history of a set of files. Instead of overwriting the theme and hoping, a developer saves a commit: a snapshot with a message explaining what changed and why. The history is permanent, so any earlier state can be brought back exactly, and any two states can be compared line by line.

Git is the system nearly everyone uses, usually with the history stored somewhere shared such as GitHub, GitLab or Bitbucket. Branches let separate pieces of work run in parallel without colliding: one for the new landing page template, another for a fix, each merged in when it is ready and tested.

Why version control matters

Its first job is undo. When a release breaks something, the question stops being “what did we change?” and becomes “revert to the last good commit”, which takes moments rather than an evening of guesswork. That single property is why it belongs on any site that earns money.

Its second job is accountability. The history records who changed what and when, which matters when several people or agencies have touched a site over the years. And its third is that it makes automated deployment possible at all — the pipeline that pushes a tested change to the live server needs a definitive record of what is meant to be live.

Common mistakes with version control

The most damaging is committing secrets. Database passwords, API keys and configuration files with live credentials get saved into the history, and because history is permanent, deleting the file later does not remove it. Keep credentials out of the repository from the start.

The second is thinking it protects your content. Version control tracks code, not the database, so your posts, orders, users and settings are outside it entirely and still need a separate backup. The third is editing files directly on the live server, which puts the site out of step with the recorded history and quietly loses that edit at the next release.

How to act on it

If you commission any custom development, ask where the repository is and make sure your business, not the contractor, controls access to it. A site whose history sits in a departing developer’s personal account is a site you only half own. Get that in the contract rather than the handover email.

Insist on meaningful commit messages, no direct edits on the live server, and credentials kept out of the repository. You do not need to understand the commands; you need to be able to ask, after a bad release, for the previous version to be restored — and get it back the same day.

Do and do not

Do

  • Keep the repository under your business's ownership
  • Require a clear message with every commit
  • Back up the database separately from the code

Do not

  • Commit passwords, API keys or live configuration files
  • Edit theme files directly on the live server
  • Assume the repository protects your content or orders

Questions people ask about this

Do I need version control for a WordPress site?

For content and standard plugins, no. It becomes worth it as soon as someone writes custom code: a bespoke theme, a plugin built for you, or template changes. At that point the history is what lets a broken release be reversed instead of debugged live, and it stops two people overwriting each other.

Does version control back up my website?

Only the code. Version control records files, so a custom theme or plugin is fully recoverable, but your posts, pages, orders, users and settings live in the database and uploaded images live on disk. Both sit outside the repository and need their own backup. Treat them as two separate protections.

Who should own the code repository for my site?

Your business, with the developer given access rather than ownership. If the history lives in a contractor's personal account, changing supplier means starting from whatever files happen to be on the server. Ask where the repository is at the start of a project and make the ownership explicit in the agreement.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.