Migrating WP


Updated Aug 11th, 2021

Two main approaches are 1.) All-In-One Migration Plugin and 2.) Manual Migration

All-In-One Migration Notes:

Adding a filter to the “functions.php” file to have ai1wm exclude the “node_modules” folder is still valid.

Manual Migration Notes:

On manual migration there is a need for find/replace on the newly copied database and it is recommended to use the “WP MigrateDB” plugin. This handles the serialized find/replace and we no longer need that external “search-replace-db” site we used to use in the past.

Each database on the local and live environments have different credentials so you need to configure the “wp-config.php” file to handle both of these with conditional logic.

In the manual migration of files using git, after the “wp-config.php” changes, it is recommended to use a thrid-party service for automatic redeployments. These include deployhq (one free project with 10 daily deployments). Also mentioned is “deploybot” but no free account, and “ftploy” that is more barebones but has a good free account with one site unlimited deployments). Note that “deployhq” has an $11 a month plan for 10 sites and $22 a month plan for 22 projects.

I have never used these services because I don’t want to pay. FTP is less secure on not as easy to use but it is also free. To transfer with SFTP you need to setup a SSH connection.

Siteground allows you to connect to GitHub to clone a repo but requires an SSH key and, although there are no auto-deployments for future changes to the repo, you can still deploy via a simple command “git push production master” so this is still easier than SFTP per Bill Erickson.

This option is not available on Siteground for “Go Geek” plans which is the next plan up from what I currently have, and costs twice as much from my current plan.