Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Git and WordPress: How to Auto-Update Posts with Pull Requests
Oct 24, 2017 @ 16:50:36

On the SitePoint PHP blog editor Bruno Skvorc has posted a tutorial showing how to combine Git and WordPress to make it easier to update posts on the site via pull requests.

At Bitfalls.com, we also use WordPress for now, and use the same peer review approach for content as we do at SitePoint.

We decided to build a tool which automatically pulls content from merged pull requests into articles, giving us the ability to fix typos and update posts from Github, and see the changes reflected on the live site. This tutorial will walk you through the creation of this tool, so you can start using it for your own WordPress site, or build your own version.

He starts by outlining the plan for the process including some of the functionality that will be put to use - like WPGlobus and Markdown files. He then walks you through the creation of an environment for the end WordPress installation (for testing), creates the webhook on the GitHub side to handle the push and the code needed to grab the content and push it into WordPress. He also includes an example of the workflow, showing a PR being created and merged to ensure the flow is functioning as expected.

tagged: wordpress git pullrequest tutorial push publish review

Link: https://www.sitepoint.com/git-and-wordpress-how-to-auto-update-posts-with-pull-requests/


Trending Topics: