Introduction
Git-It-Write is a WordPress plugin that automatically synchronizes Markdown files from a GitHub repository into your WordPress posts or pages. It is ideal for documentation sites, FAQs, wikis, and other content scenarios requiring version control and collaborative editing.
Core Features
- Automatic conversion of Markdown to HTML for publishing
- Mapping of repository file structure to post hierarchy (requires the target post type to support hierarchy)
- Automatic image upload (images placed in the
_images/folder at the repository root) - Webhook support: automatic synchronization upon each commit
- Configurable branch, subdirectory, and target post type
Installation
- Search for “Git-It-Write” in the WordPress plugin directory and install it, or download and upload it to
/wp-content/plugins/. - Activate the plugin.
- Navigate to Settings → Git-It-Write to access the configuration page.
Configuration Steps
- Add Repository: Click Add new repository, then enter the repository address (e.g.,
owner/repo). - Select Branch: Defaults to
main; you may specify another branch. - Specify Directory: To sync only a subdirectory (e.g.,
docs/), enterdocs. - Target Post Type: Recommended options are Pages (supports hierarchy) or Posts.
- Save and Pull: Click Pull the posts → Pull only changes.
Automatic Synchronization
In your GitHub repository’s Settings → Webhooks, add the Webhook URL provided on the plugin’s configuration page. Set the Content type to application/json, and select the Push events trigger. After setup, every push to the repository will automatically update the corresponding WordPress posts.
Important Notes
- One-way synchronization: Edits made directly in WordPress will not be written back to GitHub.
- Files or directories whose names begin with
_or.are ignored. - We recommend enabling permalinks to preserve the hierarchical structure derived from file paths.
- Deleting source files from GitHub will not automatically delete the corresponding WordPress posts.
Use Cases
- Product documentation hubs
- Open-source project wikis
- Collaborative team blogs
- Content libraries requiring version control