Introduction
Git-It-Write is a WordPress plugin that automatically synchronizes Markdown files from a GitHub repository as WordPress posts or pages. It’s 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
- Go to Settings → Git It Write to access the configuration page
Configuration Steps
- Add Repository: Click “Add new repository” and enter the repository identifier (e.g.,
owner/repo) - Select Branch: Defaults to
main, but 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, each push will automatically update corresponding posts.
Important Notes
- Sync is one-way only: edits made in WordPress do not propagate 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 does not automatically delete their corresponding WordPress posts
Use Cases
- Product documentation hubs
- Open-source project wikis
- Collaborative team blogs
- Content repositories requiring version control