- Article
- Intermediate
- 2 minutes read
- Reviewed August 4, 2026
- Advanced WordPress and integrations
Version control records changes to source files and supports collaboration, review and rollback.
Git is commonly used for WordPress themes, plugins, configuration templates and deployment code.
What to Track
Track source-owned files such as:
- Custom plugins.
- themes.
- must-use plugins.
- block source.
- dependency manifests.
- build configuration.
- tests.
- deployment scripts.
- documentation.
- safe configuration templates.
What Not to Track Blindly
Exclude or manage separately:
- Production uploads.
- caches.
- logs.
- backup archives.
- dependency directories when rebuilt from a lock file.
- local environment files.
- production secrets.
- generated artifacts when the release process builds them elsewhere.
Some projects commit built assets when the destination cannot run the build. Define the policy explicitly.
WordPress Core and Third-Party Packages
Projects can manage WordPress and third-party dependencies through Composer, release artifacts or hosting automation.
Avoid modifying vendor files. Record exact versions and preserve licence compliance.
Database and Content
Git does not replace database backups or content migration.
Database schema changes need explicit migration code. Configuration content can be exported through project-specific tools when a reproducible model is required.
Branches and Reviews
Keep changes small and reviewable.
A pull request can include:
- Purpose.
- screenshots.
- test steps.
- migration notes.
- security and accessibility impact.
- rollback instructions.
Frequently Asked Questions
Should the entire WordPress installation be committed?
It depends on the deployment model, but custom source, dependency definitions and reproducible configuration are the primary assets.
Can Git restore deleted production content?
Not normally. Content and uploads require backups.
Continue Learning
Previous: Accessibility for WordPress Developers