{"id":85427,"date":"2019-06-06T15:30:35","date_gmt":"2019-06-06T20:30:35","guid":{"rendered":"https:\/\/wpengine.com\/?p=85427"},"modified":"2019-06-06T15:30:40","modified_gmt":"2019-06-06T20:30:40","slug":"local-development-in-wordpress","status":"publish","type":"post","link":"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/","title":{"rendered":"Local Development in WordPress"},"content":{"rendered":"\n<p>For many developers, the convenience of coding while working remotely can end up being a challenge. <br><\/p>\n\n\n\n<p>While one of the perks of being a developer is, alongside a laptop and an Internet connection, the ability to work from anywhere, there are many cases where an Internet connection is far from a sure thing. <br><\/p>\n\n\n\n<p>Maybe you\u2019re commuting via bus or plane or maybe you\u2019re exploring a new country where the Internet connection is spotty. Relying on a shaky or unsure Internet connection is simply not an option for many developers, especially when they\u2019re working on mission-critical projects for their clients or an employer. &nbsp;&nbsp;<br><\/p>\n\n\n\n<p>As it turns out, an Internet connection doesn\u2019t have to be a necessity for development. Developing in a local environment allows developers to spin up a WordPress site where data is hosted directly on their own machine without having to connect to a hosting provider\u2019s remote servers. <br><\/p>\n\n\n\n<p>If working remotely is your thing or you\u2019re simply looking for a way to develop and experiment with more efficiency, local development could be a great option for you. In this article, we\u2019ll discuss the benefits of using local development in WordPress, when local dev is appropriate, and the technology that will help you get there:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Benefits of Local Development <\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Work offline <\/strong>&#8211; As mentioned above, with your WordPress site on your local device, you can work on it without being connected to the Internet. No WiFi, no problem. <\/li><li><strong>Speed <\/strong>&#8211; Developing with a local environment is faster because there\u2019s no waiting for a network connection. Ultimately, this means faster development cycles and maximum productivity. \u00a0<\/li><li><strong>Privacy by default &#8211;<\/strong> Developing locally prevents visitors from seeing changes you make to your site in real-time. The local environment acts as a barrier so that you can make sure new changes are compatible before deploying. <\/li><li><strong>Experiment safely <\/strong>&#8211; Plenty of things can go wrong when incorporating new themes, plugins, or code into your site. One wrong line of code can wipe your site out. Local environments allow you to test changes on a variety of browsers and screen sizes without the risk of breaking anything on your live site. <\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Local Environments vs. Staging <\/strong><\/h2>\n\n\n\n<p>Although local environments are ideal for most situations, sometimes a staging environment is the better choice. While a local environment stores all of your WordPress files on your PC or Mac instead of a web server, staging environments are typically installed on a subdomain of a parent site making them accessible on the Internet but still hidden from the public. <br><\/p>\n\n\n\n<p>As previously discussed, there are many advantages to using local environments. The lack of need for an internet connection makes offline work possible; developers also don\u2019t have to worry about downtime or performance issues resulting from a poor connection. However, in order to access your site in local dev, you have to be in front of the device in which your WordPress sites are stored. You will not be able to access the site from a different device, if necessary. <br><\/p>\n\n\n\n<p>In a staging environment, your WordPress files are stored on a live web server. The advantage of this is accessibility. Your WordPress site can be accessed anytime, from any device. This is convenient if you want to elicit feedback from a client located elsewhere. Additionally, staging environments are already on your host\u2019s server, so you might be able to identify incompatibilities that wouldn\u2019t be evident in a local environment. One last thing to consider is the increased accessibility of staging sites also increases security risks and concerns. <br><\/p>\n\n\n\n<p>The <em>right<\/em> environment for development is largely circumstantial. If you want to ensure the highest level of security, a local dev environment would be best. However, if part of your workflow includes sharing sites with clients or coworkers not local to you, a staging site might be the best option.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Docker for Local WordPress Development  <\/strong><\/h2>\n\n\n\n<p><a href=\"https:\/\/www.docker.com\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"Docker (opens in a new tab)\">Docker<\/a> offers container-based development and services that enable you to deploy Docker for local WordPress development. Using Docker, you can set up self-contained environments using a few simple commands. This becomes especially useful if you need to set up several local environments that require different servers or tools because container technology gives developers a way to virtualize an OS so that multiple workloads can run on a single OS instance. \u00a0<br><\/p>\n\n\n\n<p>While you can set up local environments in multiple ways, Docker offers developers the ability the spin up containers with isolated development environments using fewer resources than a virtual machine. Docker makes it easy to solve multiple problems across a diverse set of requirements and use <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/wpengine.com\/blog\/ssh-gateway-is-now-available\/\" target=\"_blank\">WP-CLI<\/a> to manage WordPress installations from the console.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Getting Started with Local Development<\/strong><\/h2>\n\n\n\n<p>If you\u2019re looking to implement faster development cycles, have the option to work offline, or enjoy an environment that is safer for experimentation, a local development environment might be just what you need. <br><\/p>\n\n\n\n<p>For more information on WordPress, WP Engine, and local development, check out our webinar: <em><a href=\"https:\/\/hs.wpengine.com\/webinar-wordpress-local-development\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Build Better Sites Faster: WordPress and Local Development.<\/a><\/em> Stay tuned to the WP Engine blog for upcoming information on using local development on our digital experience platform. <br><\/p>\n\n\n\n<p> <br><\/p>\n\n\n\n<p><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For many developers, the convenience of coding while working remotely can end up being a challenge. While one of the perks of being a developer is, alongside a laptop and an Internet connection, the ability to work from anywhere, there are many cases where an Internet connection is far from a sure thing. Maybe you\u2019re<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":173,"featured_media":85428,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-85427","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Local Development in WordPress<\/title>\n<meta name=\"description\" content=\"In this article, we\u2019ll discuss the benefits of using local development in WordPress, when you should use local dev, and the right technology behind it all.\" \/>\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=\"Local Development in WordPress\" \/>\n<meta property=\"og:description\" content=\"In this article, we\u2019ll discuss the benefits of using local development in WordPress, when you should use local dev, and the right technology behind it all.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-06T20:30:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-06-06T20:30:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2019\/06\/localdevwordpress_hero.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Alyssa Cuda\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@wpengine\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alyssa Cuda\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/\",\"url\":\"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/\",\"name\":\"Local Development in WordPress\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/resources\/#website\"},\"datePublished\":\"2019-06-06T20:30:35+00:00\",\"dateModified\":\"2019-06-06T20:30:40+00:00\",\"author\":{\"@id\":\"https:\/\/wpengine.com\/resources\/#\/schema\/person\/2e7ae57f60120ddae3dc029b03cfa81a\"},\"description\":\"In this article, we\u2019ll discuss the benefits of using local development in WordPress, when you should use local dev, and the right technology behind it all.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/resources\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Local Development in WordPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/resources\/#website\",\"url\":\"https:\/\/wpengine.com\/resources\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/resources\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/resources\/#\/schema\/person\/2e7ae57f60120ddae3dc029b03cfa81a\",\"name\":\"Alyssa Cuda\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/resources\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9031010d4260959c1fffb0b199ffa33db42a2b53baa3bf9927a289237e907252?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9031010d4260959c1fffb0b199ffa33db42a2b53baa3bf9927a289237e907252?s=96&d=mm&r=g\",\"caption\":\"Alyssa Cuda\"},\"description\":\"Alyssa is a Content Specialist at WP Engine. If she\u2019s not searching for a swimming hole to escape the heat in, you can usually find her baking something caloric or reading.\u2002\u2002\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Local Development in WordPress","description":"In this article, we\u2019ll discuss the benefits of using local development in WordPress, when you should use local dev, and the right technology behind it all.","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"Local Development in WordPress","og_description":"In this article, we\u2019ll discuss the benefits of using local development in WordPress, when you should use local dev, and the right technology behind it all.","og_url":"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_published_time":"2019-06-06T20:30:35+00:00","article_modified_time":"2019-06-06T20:30:40+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/wpengine.com\/resources\/wp-content\/uploads\/2019\/06\/localdevwordpress_hero.jpg","type":"image\/jpeg"}],"author":"Alyssa Cuda","twitter_card":"summary_large_image","twitter_creator":"@wpengine","twitter_site":"@wpengine","twitter_misc":{"Written by":"Alyssa Cuda","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/","url":"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/","name":"Local Development in WordPress","isPartOf":{"@id":"https:\/\/wpengine.com\/resources\/#website"},"datePublished":"2019-06-06T20:30:35+00:00","dateModified":"2019-06-06T20:30:40+00:00","author":{"@id":"https:\/\/wpengine.com\/resources\/#\/schema\/person\/2e7ae57f60120ddae3dc029b03cfa81a"},"description":"In this article, we\u2019ll discuss the benefits of using local development in WordPress, when you should use local dev, and the right technology behind it all.","breadcrumb":{"@id":"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/resources\/local-development-in-wordpress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Local Development in WordPress"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/resources\/#website","url":"https:\/\/wpengine.com\/resources\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/resources\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/resources\/#\/schema\/person\/2e7ae57f60120ddae3dc029b03cfa81a","name":"Alyssa Cuda","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/resources\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9031010d4260959c1fffb0b199ffa33db42a2b53baa3bf9927a289237e907252?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9031010d4260959c1fffb0b199ffa33db42a2b53baa3bf9927a289237e907252?s=96&d=mm&r=g","caption":"Alyssa Cuda"},"description":"Alyssa is a Content Specialist at WP Engine. If she\u2019s not searching for a swimming hole to escape the heat in, you can usually find her baking something caloric or reading.\u2002\u2002"}]}},"acf":[],"_links":{"self":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/posts\/85427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/users\/173"}],"replies":[{"embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/comments?post=85427"}],"version-history":[{"count":0,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/posts\/85427\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/media\/85428"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/media?parent=85427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/categories?post=85427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpengine.com\/resources\/wp-json\/wp\/v2\/tags?post=85427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}