Stress-free syncing: 4 steps to easily connecting remote and local WordPress environments

Albert Godgelf
CodersClan Blog
Published in
2 min readJul 2, 2020

Using WP in a local environment is quicker and easier than working while connected to the remote server. There’s no lag when you make local changes, you’re not reliant on a stable connection, and working from your own computer gives you much finer control over what you’re doing.

Eventually, however, you’ll have to sync up your local environment with the remote server. This is one of the least fun things about WP development. It can be a time-consuming and frustrating process.

This guide aims to take the stress out of remote and local syncing, guiding you through step by step to achieve a smooth transition.

1. Install WP plugin Sync DB

Repeat the following steps for both remote and local environments -

  1. Install and activate GitHub Updater (also works with, Bitbucket, GitLab and Gitea)
  2. Install and activate WP Sync DB. WP Sync DB is a WordPress plugin to keep environments in sync.
  3. Install and activate WP Sync DB Media Files.

2. Configure WP Sync DB

  • When syncing from remote to the local environment, in the remote environment, go to -
Migrate DB > Settings
  • Make sure “Accept pull requests” is checked.
  • Copy the connection string.

3. Connect Plug-in on Local Environment

  • In the local environment, go to -
Migrate DB > Migrate > Pull
  • Select Pull
  • Paste the connection string
  • Check the “Media Files” box
  • Click “Migrate DB & Save”.

In future occasions, you just need to go to the local environment, select the saved profile, and click migrate.

4. Search and replace site URL

  • After syncing the content you should search and replace the external URL with the local one. If you have WP-Cli you can use:
wp search-replace <https://remote-website.com> <http://website.local>

By following these simple steps, you will be able to sync your remote and local environment like a pro. If you want to work with real WordPress professionals, check our open positions at Codersclan.com !

--

--