The complete guide to setting up local WordPress development environments - WordPress Plugin Boilerplate Generator The complete guide to setting up local WordPress development environments - WordPress Plugin Boilerplate Generator

The complete guide to setting up local WordPress development environments

As a beginner WordPress developer, you may be tempted to do what’s known as “cowboy coding” – where you make changes directly on your live website.

After all, how else would you do it, right?

By working on a live website, the risk of something going terribly wrong is incredibly high. On top of that, the website is open to the public, which could potentially hurt the brand/client image.

That’s a very common mistake many make at the start of their web development journey. But don’t worry, we’ve developed the ultimate guide to help you get up to speed and start using the best development process around.

Doing this WILL set you apart as a web developer starting out, and we’re here to level up your web dev game and impress your clients.

In this article, we’ll be exploring what a WordPress development environment is, why it’s important, and how to set yours up in five steps. Let’s get to it.

What is a local WordPress environment? (and why you need one)

When it comes to WordPress development, our priority is to set up a dev environment for ourselves so we can work locally.

What is a dev environment?

A dev environment is a private and safe sandbox where you can experiment with your website and make changes to it.

The opposite of a dev environment would be a real live website that the entire world can see. Commonly known as a “live environment” or “production environment.”

What does working locally mean?

A public website usually has its files located on a server that a web host company maintains 24/7. So when you’re visiting a live website, you’re essentially visiting the “host” computer that your files reside.

WordPress websites live on these host servers, and not on our personal computers.

Standard web host companies are GoDaddy, HostGator, Bluehost, Siteground, Flywheel, WP Engine and so on. 

When we say “local WordPress environment,” it means that the WordPress files reside on your personal computer.

You can install WordPress to your PC and build websites on it without needing the internet for it to work. In this scenario, your website can only be viewed by you. (Although there are ways to share your work with your clients, we’ll get to that soon)

Why work in a local environment?

  1. Save money – hosting a website will cost you money. If you’re a developer working on multiple websites at the same time, the cost of hosting will quickly add up. Commonly, live servers can only accommodate roughly 5 to 10 websites on the entry-level packages before capacity needs to be upgraded for a fee. In contrast, a local host server can hold an infinite number of websites for FREE.
  1. Carry out tests in a secure environment – Typos? No problem! New features on a website can often lead to errors when they go live. To counter that, you can test it and troubleshoot it behind the scenes, before it goes live.
  1. Local setups are blazing fast – Your web building speed won’t be bottlenecked by server performance, internet speed, and other such factors. Which allows for faster and more efficient work at a more rapid speed. How wonderful would that be?
  1. Won’t need to upload to a server frequently – You only need to upload your files onto a server ONCE, after your work-in-progress is complete.

How to set up a local environment for WordPress?

Now that you understand the benefits of working locally, let’s talk about how you can get started immediately.

Firstly, you’ll need to set up a WordPress dev environment to Develop WordPress locally. To do that, you’ll need the following programs:

  1. PHP
  2. Apache (NGINX)
  3. MySQL (MariaDB)

Most computers do not come preinstalled with them, so you’ll have to install them before we go further.

Luckily, there are plenty of tools out there to do the job for you. Pick one of the following software to install the correct environment for WordPress quickly:

What programs to use:

  • MAMP
  • Bitnami WordPress
  • Local by Flywheel (recommended)
  • Valet
  • Docker
  • VirtualBox and Vagrant

Best of all, the software above is FREE. If you’ve dabbled with WordPress development in the past, you may already have one of those software installed. If that’s the case, you DO NOT need to install another one.

In this article, we’ll be using Local by Flywheel to get WordPress installed on your personal computer. You can do local WordPress development on Mac or PC

Local’s key features include:

  • One-click WordPress installations, letting you set up your local sites fast
  • Local Secure Sockets Layer (SSL) support to keep those sites safe
  • Easy access to your local sites’ root files, via Secure Shell (SSH) access
  • Shareable demo URLs, making it possible to show your site to select people
  • Customizable environments for developers, helping you configure the way your local site runs
  • The option to clone sites, export a live site to a local version, and push a local site to live hosting at Flywheel
  • An Add-ons Library, allowing you to customize your local development environment with the features you need

You can download it for free here.

Installing Local by Flywheel pretty much works like every other piece of software.

How to install Local by Flywheel:

  1. Run the installer (note that you might get a warning about running unknown software, allow it to continue).
  2. Choose the location to install. 
  3. The installation might look a little something like this:

After the installation is complete, the control panel starts. Should your operating system ask for Firewall permissions, make sure to allow Local for private networks; otherwise, it won’t work.

Once you have it installed, follow the instructions on screen to set up your local environment for WordPress. 

Note: We recommend selecting “Preferred Option” when the software prompts you to select the environment. This option includes PHP, Apache (NGINX), and MySQL in the installation.

That’s it!

Once you choose a name for your website and set up the login details, you will now have a local copy of your website to develop!

What to Do Once You’ve Set Up Your WordPress Development Environment

You can find more elaborate instructions on the Local blog here if you’re looking for an in-depth guide on building WordPress websites.

How to share your work with your client for review?

Method 1: Keep the Site Local and Host a Live Demo

If your goal is to keep it simple and your client doesn’t need much time for a detailed review of your work, a live demonstration may be the best option.

You can do this in person or set up a virtual meeting with apps like Zoom and present your work by screen sharing. The idea is to keep the site running in your local development environment and present your work by walking your client through the site.

Method 2: Migrate the Site to a Web Server and Add Password Protection

If keeping the site local isn’t going to cut it, the most obvious option is to host it on a web server but to limit site access with a password.

Go to your WordPress Settings > Reading and select the checkbox to Discourage search engines from indexing this site.

How to deploy your WordPress site?

The steps to import and take a site live vary from host to host, you’ll probably need to install a plugin, export, import, zip up some files, and verify that your migration is working.

To make it simple, we’d recommend Local Connect.

By using Local Connect, you can easily move a site between a local environment and the live environment on one of two preferred hosting providers: Flywheel and WP Engine

This dramatically streamlines the offline-editing and go-live process, and it’s totally free to use.

You can create or log into your Flywheel or WP Engine account through the Local dashboard:

Connect to Flywheel

From there, it’s a matter of a few clicks to get your local website live!

With that, you know everything you’ll need to create and manage development sites through Local.


If you’re a WordPress user, the time investment you put upfront to set up a local installation will be one of the best decisions you will ever make.

You’ll be developing websites like a pro to your clients, increase your productivity, and have a safe way to test new configurations before implementing them online. Plus, you can set up as many installations as you want.

Photo by Fotis Fotopoulos on Unsplash