One of the challenges in using WordPress with an external hosting environment and multiple developers is the creation of a local development environment with version control that will work seamlessly. Fortunately, using a combination of DesktopServer from ServerPress, an industrial-strength WordPress host like WP Engine and Git, you can have multiple development environments up and running relatively quickly. In this tutorial, I will explain how to create and set up a local WordPress development environment on a Mac, using DesktopServer by ServerPress, using a WP Engine backup point and then set up Git for version control. If you don’t use WP Engine, this tutorial probably won’t be very helpful.
I highly recommend WP Engine for reliable, secure WordPress hosting. They provide excellent customer service, daily backups and an easy restore process, a staging environment, git for version control, and much more! I like them so much that I would recommend them to anyone (even if I wasn’t part of their affiliate program, which I joined after using their service).
1. Install DesktopServer Premium
The first thing you need to do is install DesktopServer Premium. While you can probably accomplish the same thing with the limited version, it doesn’t have the import functionality. This tutorial will use the premium version to show you how to easily use a WP Engine backup point file and the import function in DesktopServer Premium to create your local WordPress environment.
2. Create and Download a Backup Point File
This should be pretty self-explanatory, but you need to go into your WP Engine dashboard and create a backup point. When you receive the notification, download the file, which you will use to create your local site.
3. Set Up Your Staging Environment
If you are going to use a staging environment, create the staging environment in the WP Engine section of the WP Admin dashboard.
4. Import the Site
In DesktopServer, use the “Export, import or share a website” option.
to “import an existing WordPress website archive”,
using the downloaded backup point zip file as the import file. (You shouldn’t have to use the Customize scrubbing options feature unless you need to make extra changes to the database when you import.)
After the site is created on DesktopServer, but before trying to access the site, go to the wp-content directory and remove the mu-plugins directory (WP Engine specific plugins) and object-cache.php. Once you have removed the files, you can access the site in your browser.
5. Set Up Git
Now that your development site is set up, you need to connect it to your WP Engine site using Git. First, make sure that your SSH key has been setup for the site with WP Engine for the GIT repository.
Next, follow all of the instructions from WP Engine for setting up git, starting with “Making the first commit”, including your first commit and push to both staging and production environments.
That’s it. Okay, maybe it’s a little more complicated than it sounds, but you should have everything you need to get it done.
What do YOU think? Let me know...