
Version Control Your Content
by Haris Amjed on WordPress.org
Provides an alternative to the native WP Revisions feature using Git services. Also works for Additional CSS and wp-admin Settings pages.

Version Control in Block Editor
The Version Control Your Content plugin provides an alternative to the native WP Revisions feature using Git services.
Requirements
- A GitHub account. If you don’t have one, you can create one here.
- A GitHub private repository. If you don’t have one, you can create one here.
- (Optional but highly recommended) A GitHub fine-grained personal access token. If you don’t have one, you can create one here.
This plugin provides an option for version control in the following places for now:
- Block Editor (Gutenberg)
- Classic Editor
- Additional CSS in the Customizer
- Default Settings pages in WP Admin
On all supported pages, you will see a “Version Control” box, and you can activate or deactivate it for that page. It will also show you the real-time GitHub API usage in the top admin bar.
This solution will put minimal load on your server because there will be no database entries, no complex SQL operations, and only simple JavaScript-based API calls to external Git services.
How it works behind the scenes?
- When you submit any HTML form, such as saving a post, it captures the form data via JavaScript before sending it to the server backend.
- It sanitizes the data and converts it to JSON format (if needed).
- It sends that JSON or HTML data to your Git repository via a commit.
- In this way, all your changes will be new commits in your Git repo in related JSON or HTML files.
- In the commits box, a list of all commits will be shown. It will also provide an option to view the changes or revert to that version.
Planned Upcoming Features
Currently, I have developed it for three views as described above, and the following features will be added in the future:
- Integration with page builders like Elementor, Divi, Beaver Builder, WPBakery, etc.
- Integration with WooCommerce
- Integration with BuddyPress
- Integration with bbPress
- Integration with WPML, etc.