Have you tried Flywheel? Learn moreJoin the best designers and creative agencies in the world. Learn more

How to set up a local WordPress development environment

How to set up a local WordPress development environment

When you’re building out a WordPress site, it can be tempting to start making changes whenever and wherever you want, right on the live site. One little CSS tweak to the button styles won’t hurt anything, right?

Even simple changes can be risky, however, which is why a certain golden rule of WordPress development exists: When you’re developing WordPress sites, even if you’re just making a minor code change, you should never, ever make changes directly on a live site.

Whether you’re a seasoned WordPress pro or a brand new beginner, you’ve probably heard this rule once or twice, and for good reason. One wrong line of code can bring the entire thing crashing down (queue a frustrating white screen), and then you’re stuck at square one.

That’s why it’s much smarter and safer to develop WordPress sites locally on your machine.

What is a local development environment?

The key word here is “local.” With a local development environment, you can set up a server on your own machine and store your site’s files locally, instead of externally (such as through a hosting company). This means that you can tinker with the code to your heart’s desire, because nothing is actually live – it’s just on your personal machine. A local development environment eliminates the risk of breaking a production site while giving you a super speedy way to test changes.

While a local development site isn’t actually live, it looks live in your browser. Because the files are stored locally on your machine, the browser has everything it needs to render the site, and even allow you into the WordPress admin to make changes. This also means that you don’t need WiFi to work on your site. That’s right – with a local development environment, you can work on WordPress sites anywhere, anytime, as long as you have your machine. And because the files are all stored locally, any changes you make will update instantly. There’s no need to mess with SFTP and wait for servers to communicate; it all just updates automatically, allowing you to work quickly and efficiently.

If you’re building WordPress sites, using a local development environment is a best-practice solution for developing customizations or simply testing out new themes or plugins (both of which should never be done on a production site). Now, let’s get your environment set up!

How to set up a local WordPress environment with Local by Flywheel


In the past, setting up a local WordPress environment was kind of a pain, but today it’s easier than ever thanks to Local by Flywheel. It’s a fuss-free (and cost-free) local development app that will improve your workflow and make it a total breeze to develop WordPress sites from anywhere in the world. Let’s get it set up!

1. Download and install Local by Flywheel

To get started, download Local by Flywheel. There’s the free version, and if you’re interested, you can sign up for the beta version of Local Pro.

A quick note: Local is currently only available for Mac OS X, but don’t worry, a Windows version is coming soon! Sign up here to get updates.

Once you download the ZIP file, open it to install Local by Flywheel on your machine.

2. Set up Local by Flywheel

The first time you open Local by Flywheel, it has to do just a hair of set up to spin up the local servers.

Don’t worry, this doesn’t take too long. You’ll be up and running in no time!

3. Spin up your first site

Now the fun begins! To whip up your first local WordPress site, click “Add Site.” Then, all you need to do is choose a few settings.


As you type a Site Name, you’ll notice the “Site Domain” box automatically generates based on the name. If you want to change that, feel free to directly edit the Site Domain text.

Note: We recommend keeping the .dev ending of the Site Domain, as it tells your computer to open that site with an internal IP address. Totally optional, though!

Next you’ll choose the Site Path, where all of the files will live on your machine. You can stick with the default, or choose a specific path, depending on your preference.


Once that’s all set, it’s to decide what versions you’d like your site to run on. When you click “Environment,” you can choose the PHP Version, Web Server, and MySQL Version. This is incredibly helpful for testing different set ups with different plugins and themes, and seeing how everything works together.


Last, there are a few WordPress specific options. You can choose if it’s a WordPress Multisite (and which type), and then you’ll create the WordPress Admin Username and Password (which you’ll use to log into the WordPress dashboard.) The very last option, Admin E-Mail, is mostly for testing purposes, but you’re welcome to use a real email address if you’d like. (We recommend inserting a real one if you plan to take the site live!)

Once you’re happy with your settings, click “Add Site.” Local by Flywheel will then spin up a separate server on your machine for your site to locally live on. This takes just a moment, as it has to configure the server and the database. Then, you’re set!

4. Start testing and experimenting

Once your site is all set up, you’ll see the site dashboard where you can make changes or experiment with your site.


Want to see your local WordPress site? Simply click the “View Site” button. It’ll open a new tab in your browser with your local WordPress site.


Ready to jump into the WordPress dashboard? You can either add in the good old /wp-admin onto the URL (just like any live WordPress site) or you can click the “Admin” button from the Local by Flywheel site dashboard. Then enter the same WordPress Admin Username and Password you declared during the set up.


If you’re ready to do some DIY customizations in a child theme, you can easily access your local site files by clicking the arrow next to the Path Name. This will open a Finder window, allowing you to quickly navigate to whatever file you’re searching for.

And that’s it – with Local by Flywheel, it’s seriously that easy to spin up local WordPress sites and start developing!

The benefits of using Local by Flywheel for WordPress development

We’ve mentioned a few of the benefits of local WordPress development (such as a secure way to experiment with WordPress sites) but Local by Flywheel takes the brownie points a few steps further:

  • Simple demo URLs: Show off your latest work! Create shareable URLs to demo your local WordPress sites to clients, collaborators, friends, or adoring fans.
  • Hassle-free local SSL support: Any site created via Local by Flywheel will automatically have a self-signed certificate created. Green padlock achieved.
  • SSH / WP-CLI access: Local by Flywheel offers simple root SSH access to individual sites, so you can tinker around if your heart desires.
  • Flexible environment options: Hot-swap between NGINX or Apache 2.4, or switch between PHP versions. Everything will stay up and running!

We think local WordPress development is so important to a designer’s workflow, and we are so excited to present Local by Flywheel as a fuss-free way to spin up local WordPress sites quickly and easily. Our super-simple application makes spinning up local WordPress sites a breeze so you can focus on building, not fixing.


Want to learn more about Local by Flywheel? Download it for free and sign up for the beta release of Local Pro here!


Join the discussion

Share this article:
Get more great content in your inbox

More articles

Build WordPress sites faster. Try Flywheel free today! Try Flywheel