What goes in and what does not
| Include | Exclude |
|---|---|
| Custom theme | WordPress core |
| Custom plugins | Third-party plugins (usually) |
| Configuration files | Uploads directory |
| Build scripts | Credentials and keys |
| Documentation | Cache and log files |
Credentials in version control is the most common and most serious mistake here.
Why it matters for a business site
- You can see exactly what changed and when
- You can go back to a working version in minutes
- Two people can work without overwriting each other
- Deployment becomes a repeatable process rather than an FTP session
The value shows up on the day something breaks. Without history, you are guessing at what changed; with it, you can see.
Content stays in the database
Version control is for code. Content lives in the database and moves in the other direction — from live down to staging.
Trying to version content leads to conflicts nobody can resolve sensibly.
Deployment
- Deploy from the repository, not from a developer's machine
- Same process every time, documented
- A backup before deploying to live
- A verified way to roll back
It matters even for one developer
History and reversibility are useful with a team of one. The overhead is small and the first time you need to revert, it pays for itself entirely.
It also means a future developer can see what was done and why.