If you’ve ever had the misfortune of making a change to your live WordPress site only to have it completely break on you, it’s time for you to learn about local development. In this post I’ll provide a very broad, high level view of what it means to set up a local environment.
A local (aka development/test) site is just a copy of your live site that lives only on your personal laptop or desktop. It’s not on the web, and the only way to access is via your personal laptop/computer. This allows you to experiment and make changes to this replica of your live (aka production/live) site without running the risk of having your live site crash on you. If you’re able to safely make the change on the local site, you can then make that same change to your live site with peace of mind.
Websites are really just a collection of files. And in order for those files to be available and accessible on the internet, they need to be hosted somewhere. This is what hosts like WP Engine, Flywheel, Godaddy etc., do.
In order for you to work locally, you’ll need to get copies of those files down from your host to your local machine. This is usually done via FTP (File Transfer Protocol) and an FTP client like Filezila or Cyberduck.
Local by Flywheel
In addition to your site files, you’ll also need a fresh install of WordPress on your local environment. There are a number of ways to do this, but the easiest way to do this is with a free app called Local by Flywheel. (Flywheel is a hosting company that now owns this app, but you do not have to have your site hosted by Flywheel to use the Local by Flywheel app.)
Once you’ve downloaded Local by Flywheel, you’ll follow the instructions to create a new site. Once it’s live, open it in your browser and access the wp-admin panel. Upload the theme from the files you downloaded via FTP, (you’ll have to zip it first) and activate it.
You’ll also want to export your database and upload it via Local’s Adminer panel. (I’ll cover this in another post; if you’re attempting to do this for the first time, proceed very cautiously and ensure you’re only exporting the database and not making any changes.)