Setting up local development site

Testing in production

Most people start their WordPress career by making a site directly in production. At some point they figure out that editing files via the builtin editor in WordPress is not the greatest way to do it. They may then get Notepad++ and a FTP client, so they can change files directly via a FTP connection with a better editor.

Again, at some point they think "there must be a better way to do this", after taking down the production site again with a PHP error - And there is. Introducing the local development environment.

A local development environment is a very important part of a proper development workflow. Mainly because it can be an effective and easy environment to do development.

But why is that? Is doing the development in a local environment not just development with extra steps? Well, yes it is. But with good extra steps.

Because, after all, Notepad++ and a FTP client does have its limits.

Here are some good reasons for doing local development:

  • It is faster, because all file operations are on disk, so no FTP dancing
  • You can start using version control, like git (really, do that)
  • You have all your favorite tools available on your computer
  • You can test whatever you like, without the worry that you will take the site down
  • Using asset handlers like Webpack requires you to have a console open

But, there is also some challengers in local development:

  • You need to have a working web environment, with web server, database and maybe more
  • It is most difficult to expose a website to a client on the outside
  • The local environment is very rarely close to the production environment
  • It requires more knowledge on how to host web sites, even locally

At the end of the day, to do professional WordPress development, you need to learn this and get used to it.
I promise you, in the long run, you will love it and never look back.

How to get started with local development

We will not go through the entire process of establishing your local environment, which depends a lot of what Operating System you are running.

But once you have one or more of your sites set up locally, you need to synchronize them with production.

This is to make sure you are developing and working on the most correct data. This way your tests will be more correct and you will decrease the risk of surprises when going into production. This is where WP Synchro comes in, to help you get that in a easy and fast way.

WP Synchro should be set up on the production site and the local site, to allow for migration between these. Then you will create a 'pull' migration on your local environment and do the pull from the production site.

This way, every time you want the newest data from production, you just push the "Run now" button and moments later, you have the newest data ready for action. Make sure you use the PRO version for this, as this allows you to also do file migrations. That way, you can also migrate the plugins, themes, uploads or other files and folders you want.

Local web development:

Consider these software packages to get your web development up and running.

Still using free version? - Upgrade to PRO with 14 day free trial

PRO version makes it possible for you to migrate files between your sites and to automatically make a database backup before migration.
You will get support for Basic Authentication and email notifications on success or failure. You also get access to priority support