{"id":7638742,"date":"2016-08-05T21:20:06","date_gmt":"2016-08-05T21:20:06","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/wordpress-development-workflow\/"},"modified":"2016-09-01T17:32:58","modified_gmt":"2016-09-01T17:32:58","slug":"wordpress-development-workflow","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/wordpress-development-workflow\/","title":{"rendered":"WordPress Development Workflow"},"content":{"rendered":"<p><strong>My Question<\/strong>: <em>Things are about to get a bit crafty&#8230;<\/em> I am beginning to outsource a lot of WordPress Development work for WP Design clients on websites like UpWork and Codeable.io &#8211; I have a <em>basic<\/em>Git(Hub) WorkFlow set up for WordPress deployment, but I&#8217;m sure it could be MUCH, MUCH better. Then again, I may be asking for too much, as I tend to do as often as I break forum rules (-:<\/p>\n<p><strong>Can someone please explain, and\/or create a diagram that shows to some extent how I could set up a workflow with the following features and integrations:<\/strong><\/p>\n<p><strong>Specifications:<\/strong><\/p>\n<ul>\n<li>Three Environments: Local WP Installation, Development Server (DigitalOcean), Production Server (DigitalOcean)<\/li>\n<li>Private GitHub Version Control Repo for Each Application\n<ul>\n<li>I want the master to be protected so it can&#8217;t be updated unless I approve a pull request from another developer&#8217;s branch.<\/li>\n<li>I need a .gitignore file that excludes everything but the BARE MINIMUM for the website changes to be transferred. I&#8217;ve heard mix thoughts on including Plugins in this, if you have any input on this, please share<\/li>\n<li>I want to have a way to auto-deploy merges into the master (from a developer&#8217;s branch) to the WP Development Installation with a webhook into GitHub. I know DeployHQ has a Webhook feature that does this but if you have another suggestion, let me know. &#8211; This is most useful for one-click merges to the development server<\/li>\n<\/ul>\n<\/li>\n<li><strong>ServerPilot.io<\/strong> (<em>If there is a better option, I am more than happy to part with ServerPilot<\/em>) is used to manage individual apps for each of my clients so I can log Bandwith, disk usage, etc for each &#8220;app.&#8221;<\/li>\n<li>The Local Environment has its own individual Database (MySQL in a LAMP stack) that communicates with a Remote Development Database via <strong>WP Migrate DB Pro<\/strong>.<\/li>\n<li>Each website\/app is individually backed up every 12hrs (24hrs is fine if it&#8217;s the minimum on a suggested service) so it can be easily restored &#8211; I&#8217;m currently using ManageWP orion to do this but It&#8217;s not extremely straightforward and has too many other features I don&#8217;t have use for but would still be paying for.<\/li>\n<li>I&#8217;d like to have a scripted one-click (well, as few clicks as possible with minimal to no command line, if possible, so I can onboard employees more easily) setup for the development remote server that installs a LAMP environment and a custom WordPress install that has a few custom plugins and customizations. It will be hosted in a GitHub repo, so I assume the easiest way would be to clone it.<\/li>\n<li>And, perhaps the most &#8220;<em>fun<\/em>&#8221; aspect of this is one-click and instantaneous deployment to the Live server that takes less than 10 seconds. I was thinking maybe via DNS and just switching the live with the production server but DNS takes up to 24 hours to propagate.<\/li>\n<\/ul>\n<p>I know it&#8217;s a challenging setup and I&#8217;m extremely thankful for anyone who takes the time to read and provide their input. Thanks so much!<\/p>\n","protected":false},"template":"","class_list":["post-7638742","topic","type-topic","status-publish","hentry","topic-tag-deployment","topic-tag-development","topic-tag-environment","topic-tag-local","topic-tag-staging"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7638742","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7638742\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7638742"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}