Cowboy Coding vs. Local Development

sillhouette of cowboy and horses against the setting sun

If you’re making changes to your live WordPress site, you’re engaged in cowboy coding. If this hasn’t resulted in the “White Screen of Death” yet, it almost certainly will. A local environment provides a disposable, copy of your live site where you can safely test updates and changes.

Defining Local

A local site:

  • is a working copy of your live site
  • lives only on your personal laptop or desktop
  • is NOT on the web
  • is a disposable, test environment
  • can act as an extra back-up of your live site

With a local site injected into your workflow, you’ll know if a major update causes problems before it’s too late. Let’s figure out how to create one.

Files

Websites are really just a collection of files. Hosting companies (WP Engine, Flywheel, Godaddy, etc.,) provide a place for you to park those files and provide access to visitors on the web. In order for you to work locally, you’ll need to get copies of those files down from your host to your local machine. File Transfer Protocol (FTP) provides a means of safely pulling copies of those files down from your host to your computer. Cyberduck and Filezila are two popular FTP tools.

Local by Flywheel

In addition to your site files, you’ll also need a fresh install of WordPress for your local environment. Local by Flywheel provides a nice, clean interface that’s easy to use. Oh, and it’s free. (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, follow the instructions to create a new WordPress site. You’ll need to swap out the theme files from the fresh WordPress install the ones from your site you’ve grabbed via FTP.

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.)

Published
Categorized as Tutorial

Leave a comment

Your email address will not be published. Required fields are marked *