{"id":99878,"date":"2020-02-17T11:16:03","date_gmt":"2020-02-17T17:16:03","guid":{"rendered":"https:\/\/wpengine.com\/?post_type=resource&#038;p=99878"},"modified":"2023-10-16T17:19:02","modified_gmt":"2023-10-16T22:19:02","slug":"github-wordpress-integration","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/","title":{"rendered":"WordPress and GitHub Integration"},"content":{"rendered":"\n<p>Developing themes and plugins for WordPress can be both <a href=\"https:\/\/wpengine.com\/resources\/sell-wordpress-themes\/\" target=\"_blank\" rel=\"noreferrer noopener\">fun and lucrative<\/a>. While there are many ways to manage your workflow, version control, and storage, zeroing in on the best available tools can help take your projects to the next level.&nbsp;<\/p>\n\n\n\n<p>Fortunately, <a href=\"https:\/\/github.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub<\/a> makes that task a lot easier. It\u2019s a popular open-source code repository with many valuable tools for developers. Plus, it\u2019s currently the largest host of open-source code in the world, boasting over 34 million users and more than 100 million repositories.&nbsp;&nbsp;<\/p>\n\n\n\n<p>This article will provide you with a complete guide to integrating your WordPress development site with GitHub. Additionally, we\u2019ll look at some plugins you may want to consider adding to your workflow. Let\u2019s get coding!&nbsp;<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">How to Combine GitHub and WordPress (In 4 Steps)<\/h2>\n\n\n\n<p>In order to combine your WordPress development environment with GitHub, you\u2019ll need to go through a few important steps. This starts with creating a local WordPress GitHub environment. Then you\u2019ll move on to installing GitHub and creating your first repository.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1:&nbsp; Create a Local WordPress Environment<\/h3>\n\n\n\n<p>If you plan on developing for WordPress, it\u2019s best to establish a high-quality, <a href=\"https:\/\/wpengine.com\/blog\/local-development-in-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">local development environment<\/a>. For this, we recommend using <a href=\"https:\/\/localbyflywheel.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Local<\/a>:<\/p>\n\n\n\n<p>Developing locally means you can create an environment that will mimic your production server. You can develop and test your source code offline, without causing disruption to anything that\u2019s already live.&nbsp;<\/p>\n\n\n\n<p>Once you set up your local environment, you\u2019ll have all of the <a href=\"https:\/\/localwp.com\/features\/\" target=\"_blank\" rel=\"noreferrer noopener\">necessary developer features and tools<\/a> at your disposal. To get started, you can select <em>Free Download!<\/em> on the home page, and choose your operating system:<\/p>\n\n\n\n<p>After you\u2019ve downloaded the software package and completed the installation process for your system, you can open Local and begin setting up your local development site. When you\u2019re prompted, click on <em>Create a New Site<\/em>:&nbsp;<\/p>\n\n\n\n<p>Next, you\u2019ll enter your development site\u2019s name. The local site domain name and path will auto-populate. However, you can use the <em>Browse<\/em> option to select a different local path for your site if needed:&nbsp;<\/p>\n\n\n\n<p>You\u2019ll also have the option to <a href=\"https:\/\/getflywheel.com\/wordpress-support\/what-is-blueprints\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>Create Site from Blueprint<\/em><\/a><em>. <\/em>This means that as you start to amass multiple sites or development projects, you can package together sets of WordPress themes and plugins you use frequently. Then by using Blueprints, you can quickly access and load them when you create a new development site.&nbsp;<\/p>\n\n\n\n<p>After finishing your domain name selection, click <em>Continue<\/em>. Next, you\u2019ll be prompted to choose a username and password for your local WordPress installation:<\/p>\n\n\n\n<p>Once your development environment is complete, you\u2019ll see a screen with a summary of your new site\u2019s information:&nbsp;<\/p>\n\n\n\n<p>This will be the main dashboard for all the local sites you create with Flywheel. From here, you can quickly check the status of your site, view it, and head to your WordPress admin dashboard by selecting <em>Admin<\/em>. Additionally, you can easily view your WordPress database, security, and other utility information.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Install GitHub&nbsp;<\/h3>\n\n\n\n<p>To enable the use of GitHub with WordPress, you\u2019ll need to create a free GitHub account and <a href=\"https:\/\/help.github.com\/en\/github\/getting-started-with-github\/set-up-git\" target=\"_blank\" rel=\"noreferrer noopener\">download and install Git<\/a> on your local drive. Git is the open-source Version Control System (VCS) that handles all of the workflows on GitHub.<\/p>\n\n\n\n<p>You have two choices for what you can use to install and configure Git. If you\u2019re comfortable using a <a href=\"https:\/\/www.toptal.com\/software\/best-command-line-tools\" target=\"_blank\" rel=\"noreferrer noopener\">command-line tool<\/a>, that\u2019s one option. Alternatively, you can use the <a href=\"https:\/\/desktop.github.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub Desktop client<\/a>:&nbsp;<\/p>\n\n\n\n<p>For this demonstration, we\u2019ll download and install GitHub Desktop. After downloading and unzipping the files, you\u2019ll need to sign in with your GitHub information:&nbsp;<\/p>\n\n\n\n<p>If you\u2019re not familiar with how Git works, you can think of it as the middleman in your workflow. GitHub is where you can host your project, while Git is the function that pulls your GitHub repository to your local development environment so you can work on it.<\/p>\n\n\n\n<p>When you\u2019re done, you can use Git to push the changes to GitHub, so your files will always be up-to-date.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Create a Repository&nbsp;<\/h3>\n\n\n\n<p>Now that you have your local environment ready to go, with WordPress and Git installed on your machine, you\u2019re ready to create a repository for your project. From the GitHub Desktop, you can select <em>Create a New Repository on Your Hard Drive<\/em>:<\/p>\n\n\n\n<p>You\u2019ll then be prompted to configure your new local repository:&nbsp;<\/p>\n\n\n\n<p>After naming your repository and configuring a few other settings, such as <a href=\"https:\/\/help.github.com\/en\/github\/creating-cloning-and-archiving-repositories\/licensing-a-repository\" target=\"_blank\" rel=\"noreferrer noopener\">selecting a license<\/a> if needed, click on <em>Create Repository<\/em>. You\u2019ll then see your new repository in the GitHub Desktop user interface:<\/p>\n\n\n\n<p>This is command central for your project. From here, you can commit changes and publish your repository to GitHub. Additionally, you can create repositories from the GitHub website:&nbsp;<\/p>\n\n\n\n<p>If you create your repository this way, you can use the <em>Clone repository<\/em> feature in your Desktop interface to pull it into your local development environment:&nbsp;<\/p>\n\n\n\n<p>After you choose the repository you want to clone from GitHub and set the local path, click on <em>Clone<\/em> to complete the action.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Publish Your Repository<\/h3>\n\n\n\n<p>Once you\u2019ve added files to your local repository folder, they will appear in the GitHub desktop. From there, you can initiate changes, open your code editor, and publish your repository to GitHub:<\/p>\n\n\n\n<p>After clicking on <em>Publish repository<\/em>, you\u2019ll be prompted to add a description and complete the publishing process:&nbsp;<\/p>\n\n\n\n<p>Then, you can check your GitHub account to make sure your repository was published:<\/p>\n\n\n\n<p>As you make changes to your files and test them in your Local by Flywheel WordPress environment, you can easily commit your changes in GitHub Desktop. Then, you\u2019ll be able to publish your updated repositories to GitHub with one click.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Github Plugins for WordPress<\/h2>\n\n\n\n<p>There are not many plugins for WordPress that add meaningful functionality for GitHub. Some newer and unvetted plugins are available that are designed to <a href=\"https:\/\/wordpress.org\/plugins\/markdown-github\/\">enable updates to your blog<\/a> via published repositories. However, there <em>are<\/em> two reliable options that offer useful features for developers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. <a href=\"https:\/\/wordpress.org\/plugins\/github-embed\/\">Github Embed<\/a><\/h3>\n\n\n\n<p><a href=\"https:\/\/wordpress.org\/plugins\/github-embed\/\">Github Embed<\/a> is a free WordPress plugin that enables you to embed GitHub information on your website. You can do this by using a simple link in your WordPress pages and posts. Once you embed your GitHub link on your website, it will be updated whenever you make a change to that repository.&nbsp;<\/p>\n\n\n\n<p>This is especially useful for developers who sell themes and plugins. With this tool, you can easily keep your customers up-to-date on any new changes, issues, and improvements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. <a href=\"https:\/\/github.com\/afragen\/github-updater\">GitHub Updater<\/a><\/h3>\n\n\n\n<p>It\u2019s important to note that the plugins and themes you download from GitHub and add to your WordPress website will not be flagged for updates. This means that if the developer makes a change, you won\u2019t get a notice in your WordPress dashboard.&nbsp;<\/p>\n\n\n\n<p>That\u2019s where the <a href=\"https:\/\/github.com\/afragen\/github-updater\">GitHub Updater<\/a> plugin can help you out. It was developed to make automatic updates available for GitHub themes and plugins. Some GitHub developers even require the use of this plugin when you install their projects on your WordPress website.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Next Steps<\/h2>\n\n\n\n<p>At this point, you\u2019re all set up to create a Git workflow between Flywheel, WordPress, and GitHub! You\u2019ll be able to retrieve code from GitHub, and create your own themes and plugins or contribute to current projects in the <a href=\"https:\/\/make.wordpress.org\/community\/\">WordPress community<\/a>.&nbsp;<\/p>\n\n\n\n<p>In addition to enhancing your development workflow, you can also leverage GitHub\u2019s many features and tools. For example, you can use <a href=\"https:\/\/pages.github.com\/\">GitHub Pages<\/a> to push your repositories straight to a live website. GitHub is also highly effective for projects with <a href=\"https:\/\/help.github.com\/en\/github\/setting-up-and-managing-organizations-and-teams\/about-teams\">large teams<\/a> all working on the same project.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stay in Control With WP Engine<\/h2>\n\n\n\n<p>Orienting yourself to GitHub and a more streamlined development workflow can be a game-changer for your projects. Not only is this platform ideal for freelancers, but it also adds to the innovation that takes place in open-source communities.&nbsp;<\/p>\n\n\n\n<p>Here at WP Engine, we believe in the <a href=\"https:\/\/wpengine.com\/blog\/wp-engine-announces-engine-for-good\/\" target=\"_blank\" rel=\"noreferrer noopener\">power of open-source developmen<\/a>t. That\u2019s why we work to provide the best <a href=\"https:\/\/developer.wordpress.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">developer resources<\/a> and <a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress hosting<\/a> for WordPress users. <a href=\"https:\/\/wpengine.com\/plans\/\" target=\"_blank\" rel=\"noreferrer noopener\">Check out our plans<\/a> for your next project!\u00a0\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Developing themes and plugins for WordPress can be both fun and lucrative. While there are many ways to manage your workflow, version control, and storage, zeroing in on the best available tools can help take your projects to the next level.&nbsp; Fortunately, GitHub makes that task a lot easier. It\u2019s a popular open-source code repository<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":177,"featured_media":0,"template":"","resource-topic":[901],"resource-role":[895,896],"resource-type":[916],"class_list":["post-99878","resource","type-resource","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WordPress and Github Integration | WP Engine\u00ae<\/title>\n<meta name=\"description\" content=\"Github &amp; WordPress are the bread and butter for many WordPress developers. If you\u2019ve ever wondered how you can integrate WordPress &amp; Github, check out the WP Engine guide!\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress and Github Integration | WP Engine\u00ae\" \/>\n<meta property=\"og:description\" content=\"Github &amp; WordPress are the bread and butter for many WordPress developers. If you\u2019ve ever wondered how you can integrate WordPress &amp; Github, check out the WP Engine guide!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-16T22:19:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2024\/05\/WPE-IMG-Thumbnail-1200x630-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/\",\"name\":\"WordPress and Github Integration | WP Engine\u00ae\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2020-02-17T17:16:03+00:00\",\"dateModified\":\"2023-10-16T22:19:02+00:00\",\"description\":\"Github & WordPress are the bread and butter for many WordPress developers. If you\u2019ve ever wondered how you can integrate WordPress & Github, check out the WP Engine guide!\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"WordPress and GitHub Integration\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/aba73ed4c15eda43b5fd78844ec31fad\",\"name\":\"Samantha Rodriguez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g\",\"caption\":\"Samantha Rodriguez\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress and Github Integration | WP Engine\u00ae","description":"Github & WordPress are the bread and butter for many WordPress developers. If you\u2019ve ever wondered how you can integrate WordPress & Github, check out the WP Engine guide!","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"WordPress and Github Integration | WP Engine\u00ae","og_description":"Github & WordPress are the bread and butter for many WordPress developers. If you\u2019ve ever wondered how you can integrate WordPress & Github, check out the WP Engine guide!","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2023-10-16T22:19:02+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2024\/05\/WPE-IMG-Thumbnail-1200x630-1.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/","name":"WordPress and Github Integration | WP Engine\u00ae","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2020-02-17T17:16:03+00:00","dateModified":"2023-10-16T22:19:02+00:00","description":"Github & WordPress are the bread and butter for many WordPress developers. If you\u2019ve ever wondered how you can integrate WordPress & Github, check out the WP Engine guide!","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/github-wordpress-integration\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"WordPress and GitHub Integration"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/aba73ed4c15eda43b5fd78844ec31fad","name":"Samantha Rodriguez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/933722cf8761e0c08fbced6085998032df460c5ecfa2481d9cd16f569f3da2c1?s=96&d=mm&r=g","caption":"Samantha Rodriguez"}}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/02\/shutterstock_1109565767.jpg","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Agency, Developer","topic":"<strong>Topics:<\/strong> WordPress","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/99878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/177"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=99878"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=99878"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=99878"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=99878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}