Git it Write – Write posts from GitHub


Git it Write allows to publish the markdown files present in a GitHub repository to your WordPress site. So with this plugin, whenever the files are added, updated in the repository the WordPress post will be added, updated accordingly.

This plugin is inspired from static site generators like Jekyll, Next.js, Gatsby.js on how content is written is markdown. This is a similar idea for WordPress where markdown files are parsed from GitHub and published as posts.

👓 Live example: Source github repository (/docs/ folder) to Posts published

Getting started: Get started with Git it write. Learn how to write .md files and publish posts on WordPress.

This allows people to collaborate with the post, share edits and suggestions in GitHub which when pulled the WordPress post will be updated automatically.

If a repository has files in the below structure,


Then below posts will be created like below (if permalinks are configured and the post type supports «hierarchy» i.e creating posts level by level (example: pages))

🎲 What is the use of this plugin ?

  • Publish posts using the files in your GitHub repository.
  • Write your posts in Markdown format.
  • Write your posts on your desktop application (Notepad++, Sublime Text, Visual studio code).
  • Collaborate, involve communities on the files in GitHub and publish them on WordPress.
  • All the advantages of Git and it’s version management system.

🚀 Some use cases

  • Can be used for documentation posts, FAQs, Wikis etc.
  • Write blog posts.
  • Any articles which may need community involvement.

✨ Features

  • Markdown will be processed and post will be published as HTML.
  • Images used in the source file will be uploaded to WordPress.
  • Relative links are supported.
  • Set post properties like post status, title, order, category, tags etc, in the source file itself.
  • Webhook support (whenever repository is changed, it updates the plugin to pull the latest changes and publish the posts)
  • Add multiple repositories.
  • Publish to any post type.
  • Posts are published in hierarchial manner if they are under folders. Example: a file dir1/ will be posted as dir1/hello/ in WordPress if the post type supports hierarchy.
  • Support for post metadata like setting tags, categories, custom fields.

ℹ Note

  • Only Markdown files will be pulled and published right now
  • Posts won’t be deleted when it’s source file is deleted on GitHub.
  • It is preferred to have a permalink structure.
  • It is preferred to select a post type which supports hierarchy.
  • Images have to present only in _images folder in the repository root. Markdown files have to relatively use them in the file.

🥗 Recommendation

It is recommended that a permalink structure is enabled in the WordPress site so that, if you have file under docs\reference\ then a post is published like This will be the result when post type has hierarchy support. They will be posted level by level for every folder in the repository. The folder’s post will be taken from the file if exists under that folder.

🏃‍♂️ Using the plugin

  1. Have a GitHub repository where all the source files (markdown files) are maintained (organized in folders if needed the exact structure)
  2. In the plugin settings page, click add a new repository.
  3. Enter the details of the repository to pull the posts from and under what post type to publish them.
  4. Save the settings
  5. Click «Pull the posts» and then «Pull only» changes. This will publish posts for all the markdown files.
  6. To automatically update posts whenever repository is updated, configure webhook as mentioned in the settings page.



  • Your files in a GitHub repository
  • Posts pulled and published from GitHub.
  • Content of the published post.
  • Published post.
  • Plugin admin page.
  • Repository configuration page.


  1. Extract the zipped file and upload the folder git-it-write to to /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Open the admin page from the «Git it Write» link under the settings menu.

Vanlege spm.

Please visit the plugin documentation page for complete list of FAQs.

When a post is edited in WordPress will that update the file in the GitHub repository ?

No. This plugin won’t sync post content. It is a one way update. Only changes made to the GitHub repository will update the posts and not otherwise.

What all files in the repository will be published ?

All markdown files will be published as posts.

What are not published ?

Any folder/file starting with _ (underscore), . (dot) won’t be considered for publishing.

Can I pull posts from a specific branch in the repository ?

Yes, if you want to pull posts from a branch in a repository then you can specify it in the plugin’s repository settings page.

Can I pull posts from a specific folder in the repository ?

Yes, if you want to pull posts from a folder in a repository then you can specify it in the plugin’s repository settings page. For example, if a repository has a folder website\main\docs and if you want to pull only from docs folder, then you can specify website\main\docs in the plugin settings.


9. mai 2024 1 reply
Thank you for developing this plugin; it meets perfectly my needs. According to the settings, it should be possible to import data from the specific GitHub folder «website/main/docs». Unfortunately, this feature does not work as the folder structure can only be specified on one level. After consulting the developer, I was informed that this is a bug that was supposed to be fixed within a few days. However, the issue still persists three months later and even after a new version was released. I would have greatly appreciated clearer communication regarding this issue. The features promised in the plugin and by the support team should be reliably delivered. Unfortunately, I now find myself compelled to look for alternative solutions.
8. oktober 2022 1 reply
I cannot recommend this plugin enough, it is the only viable solution to synch a markdown git repository with your WordPress page. Aakash is always quick to help you out if you have any questions.
15. april 2021 1 reply
Sometimes commits and pushes don’t reflect properly, but that’s enough. This is the way I wanted it.
Les alle 6 omtalar

Bidragsytarar og utviklarar

“Git it Write – Write posts from GitHub” is open source software. The following people have contributed to this plugin.




  • Fix: Filename with multiple dots are ignored.


  • New: Error message during HTTP get/post is now logged.
  • Fix: Double quotes in WordPress shortcodes are escaped.
  • Fix: GitHub access token field in admin form is converted to a password field.
  • Fix: Typos in readme and admin page.


  • New: Images (_images) can be now organized in folders.
  • New: Featured image can now be set to posts.
  • New: Markdown images are now wrapped with figure tag and added support for image caption.
  • New: Image tags now have class attributes similar to WordPress editor.
  • Fix: Images were not uploaded for private repositories. (Thanks to for the contribution)
  • Fix: Webhook publish request fails to upload images.


  • New: Options like comment status, page template, sticky post can now be set.
  • New: New option to skip file from being published.


  • New: Post date can now be set.
  • Fix: Enhancements to data escaping in the admin page.


  • Fix: Repository not found issue by adding GitHub authentication.
  • Fix: Duplicate posts when filename has special characters.
  • Fix: PHP warning when directory has no file.


  • New: Support for git branches (Thanks to for the contribution)
  • New: Logs directory has been changed to the uploads directory.
  • Fix: Minor admin page enhancements.


  • New: Support for custom fields
  • New: New shortcode attribute in [giw_edit_link] to automatically wrap in p tag.
  • Fix: Added permission callback for the webhook REST API.
  • Fix: Minor admin UI enhancements.


  • New: Support for Parsedown extra


  • Fix: Webhook is changed to POST method.
  • Fix: Readme formatting.


  • First version of the plugin.