{"id":29940,"date":"2022-09-23T07:24:44","date_gmt":"2022-09-23T07:24:44","guid":{"rendered":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/"},"modified":"2025-04-30T00:25:12","modified_gmt":"2025-04-30T00:25:12","slug":"how-to-setup-github-with-staq","status":"publish","type":"knowledgebase","link":"https:\/\/www.wpstaq.com\/sg\/knowledgebase\/how-to-setup-github-with-staq\/","title":{"rendered":"How to setup Github with Staq (plugin\/theme only)"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p><strong>Please note <\/strong>&#8211; this KB is to integrate Github when a plugin or theme is in its own repository. If you have an entire site in its own repository, please see this KB on <a href=\"https:\/\/www.wpstaq.com\/knowledgebase\/integrating-git-with-staq\/\">how to integrate your entire site&#8217;s repo<\/a> into Staq instead. To integrate a plugin\/theme in its own repo from Github, please see the information below on how to setup inside Staq.<\/p>\n<h2>Global \/ Website managed plugins\/theme<\/h2>\n<h3>Global managed plugin\/theme<\/h3>\n<p>You can manage your Github repository as a WordPress plugin inside the Staq Global Plugins section which means you can pull your changes directly into your Global Plugin in Staq and it&#8217;ll automatically update across every single site that has this Global Plugin activated on each site.<\/p>\n<p>To access this function, go to\u00a0<strong>Global Plugins or Global Themes &gt; Connect via Git<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27655\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/1.1-1024x292.png\" alt=\"\" width=\"1024\" height=\"292\" \/><\/p>\n<p><strong>Website managed plugin<\/strong><\/p>\n<p>You can apply a Github repository as a WordPress plugin inside an individual website.<\/p>\n<p>To access this function, go to the website in question and then\u00a0<strong>Plugins &gt; Connect via Git<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27657\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/2-1024x324.png\" alt=\"\" width=\"1024\" height=\"324\" \/><\/p>\n<h2>Instructions<\/h2>\n<p>Select <strong>Github\u00a0<\/strong>and\u00a0enter your repository URL and then the production branch i.e. <em>main<\/em><\/p>\n<p>Click\u00a0<strong>Add SSH Keys<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27674\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/github-1-1024x877.png\" alt=\"\" width=\"1024\" height=\"877\" \/><\/p>\n<p>In the next screen, click\u00a0<strong>Generate SSH key<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27675\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/github-2-1024x899.png\" alt=\"\" width=\"1024\" height=\"899\" \/><\/p>\n<p>Then, click\u00a0<strong>Copy SSH key<\/strong> and then click link, <strong>Access keys<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27676\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/github-3-1024x895.png\" alt=\"\" width=\"1024\" height=\"895\" \/><\/p>\n<p>Click\u00a0<strong>Add deploy key<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27677\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/github-4-1024x475.png\" alt=\"\" width=\"1024\" height=\"475\" \/><\/p>\n<p>Insert the\u00a0<strong>Title,<\/strong>\u00a0paste the <strong>Key <\/strong>and click <strong>Allow write access<\/strong>.<\/p>\n<p>Click\u00a0<strong>Add Key:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27678\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/github-5-1024x577.png\" alt=\"\" width=\"1024\" height=\"577\" \/><\/p>\n<p>Go back to the Staq page and click\u00a0<strong>Connect Repository<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27679\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/github-6-1024x888.png\" alt=\"\" width=\"1024\" height=\"888\" \/><\/p>\n<p>You should be directed to a different screen and then click\u00a0<strong>Add Webhook<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27665\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/10-1024x963.png\" alt=\"\" width=\"1024\" height=\"963\" \/><\/p>\n<p>In the last step, click <strong>Copy secure URL <\/strong>and then click <strong>Webhooks<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27680\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/github-8-1024x891.png\" alt=\"\" width=\"1024\" height=\"891\" \/><\/p>\n<p>In Github, click <strong>Add webhook<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27681\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/github-9-1024x575.png\" alt=\"\" width=\"1024\" height=\"575\" \/><\/p>\n<p>Enter the <strong>Payload URL <\/strong>(this is the secure URL link inside Staq).<\/p>\n<p>By default, <strong>Enable SSL verification,<\/strong> <strong>Just the Push Event<\/strong> and\u00a0<strong>Active<\/strong> should be enabled.<\/p>\n<p>Click <strong>Add webhook:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27682\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/github-10-1024x726.png\" alt=\"\" width=\"1024\" height=\"726\" \/><\/p>\n<p>Go back to Staq and click the <strong>checkbox<\/strong>:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27683\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/github-11-1024x923.png\" alt=\"\" width=\"1024\" height=\"923\" \/><\/p>\n<p>Inside the Plugins\/Themes page of Staq, you should see a bucket icon that symbolizes Github connection:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27684\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/github-12-1024x486.png\" alt=\"\" width=\"1024\" height=\"486\" \/><\/p>\n<p>If you click\u00a0<strong>History<\/strong>, it will reveal the related events to your plugin \/ theme such as code pushes and system health checks realized by Staq to ensure the validity of the integration:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-27672\" src=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2022\/09\/17-1024x467.png\" alt=\"\" width=\"1024\" height=\"467\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"featured_media":29662,"parent":0,"template":"","class_list":["post-29940","knowledgebase","type-knowledgebase","status-publish","has-post-thumbnail","hentry","categories-git","categories-plugins-themes-git"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to setup Github with Staq (plugin\/theme only) - Managed Hosting Platform for WordPress<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to setup Github with Staq (plugin\/theme only) - Managed Hosting Platform for WordPress\" \/>\n<meta property=\"og:description\" content=\"Introduction Please note &#8211; this KB is to integrate Github when a plugin or theme is in its own repository. If you have an entire site in its own repository, please see this KB on how to integrate your entire site&#8217;s repo into Staq instead. To integrate a plugin\/theme in its own repo from Github,&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/\" \/>\n<meta property=\"og:site_name\" content=\"Managed Hosting Platform for WordPress\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/staqhosting\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-30T00:25:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/git-integration.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1002\" \/>\n\t<meta property=\"og:image:height\" content=\"502\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-setup-github-with-staq\\\/\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-setup-github-with-staq\\\/\",\"name\":\"How to setup Github with Staq (plugin\\\/theme only) - Managed Hosting Platform for WordPress\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-setup-github-with-staq\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-setup-github-with-staq\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/git-integration.png\",\"datePublished\":\"2022-09-23T07:24:44+00:00\",\"dateModified\":\"2025-04-30T00:25:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-setup-github-with-staq\\\/#breadcrumb\"},\"inLanguage\":\"en-sg\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-setup-github-with-staq\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-sg\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-setup-github-with-staq\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/git-integration.png\",\"contentUrl\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/git-integration.png\",\"width\":1002,\"height\":502},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/how-to-setup-github-with-staq\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.wpstaq.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to setup Github with Staq (plugin\\\/theme only)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#website\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/\",\"name\":\"Managed Hosting Platform for WordPress\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wpstaq.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-sg\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#organization\",\"name\":\"Staq\",\"alternateName\":\"WPStaq\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-sg\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/cropped-LogoNoText.png\",\"contentUrl\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/cropped-LogoNoText.png\",\"width\":512,\"height\":512,\"caption\":\"Staq\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/staqhosting\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/wpstaq\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to setup Github with Staq (plugin\/theme only) - Managed Hosting Platform for WordPress","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/","og_locale":"en_US","og_type":"article","og_title":"How to setup Github with Staq (plugin\/theme only) - Managed Hosting Platform for WordPress","og_description":"Introduction Please note &#8211; this KB is to integrate Github when a plugin or theme is in its own repository. If you have an entire site in its own repository, please see this KB on how to integrate your entire site&#8217;s repo into Staq instead. To integrate a plugin\/theme in its own repo from Github,&hellip;","og_url":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/","og_site_name":"Managed Hosting Platform for WordPress","article_publisher":"https:\/\/www.facebook.com\/staqhosting\/","article_modified_time":"2025-04-30T00:25:12+00:00","og_image":[{"width":1002,"height":502,"url":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/git-integration.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/","url":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/","name":"How to setup Github with Staq (plugin\/theme only) - Managed Hosting Platform for WordPress","isPartOf":{"@id":"https:\/\/www.wpstaq.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/#primaryimage"},"image":{"@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/git-integration.png","datePublished":"2022-09-23T07:24:44+00:00","dateModified":"2025-04-30T00:25:12+00:00","breadcrumb":{"@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/#breadcrumb"},"inLanguage":"en-sg","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/"]}]},{"@type":"ImageObject","inLanguage":"en-sg","@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/#primaryimage","url":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/git-integration.png","contentUrl":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/git-integration.png","width":1002,"height":502},{"@type":"BreadcrumbList","@id":"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-setup-github-with-staq\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.wpstaq.com\/"},{"@type":"ListItem","position":2,"name":"How to setup Github with Staq (plugin\/theme only)"}]},{"@type":"WebSite","@id":"https:\/\/www.wpstaq.com\/#website","url":"https:\/\/www.wpstaq.com\/","name":"Managed Hosting Platform for WordPress","description":"","publisher":{"@id":"https:\/\/www.wpstaq.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wpstaq.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-sg"},{"@type":"Organization","@id":"https:\/\/www.wpstaq.com\/#organization","name":"Staq","alternateName":"WPStaq","url":"https:\/\/www.wpstaq.com\/","logo":{"@type":"ImageObject","inLanguage":"en-sg","@id":"https:\/\/www.wpstaq.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/cropped-LogoNoText.png","contentUrl":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/cropped-LogoNoText.png","width":512,"height":512,"caption":"Staq"},"image":{"@id":"https:\/\/www.wpstaq.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/staqhosting\/","https:\/\/www.linkedin.com\/company\/wpstaq"]}]}},"_links":{"self":[{"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/knowledgebase\/29940","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/types\/knowledgebase"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/media\/29662"}],"wp:attachment":[{"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/media?parent=29940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}