Recently I’ve been using the All-in-One WP Migration plugin for hassle free database migrations between local, staging and production environments.
I have also found it helpful for copying clients existing websites when a local development version is needed.
So far I like the straight forward nature of it. It’s easy to run a find and replace on domain names so turning
mywebsite.com is simple.
You can then export your database to a file for import on a target environment. Just make sure you have the plugin installed there too.
Other export and import options like FTP, Amazon S3, Digital Ocean etc are available through paid extensions. Though so far I’ve not required them. Depending on your setups I could see how these might help save time though.
Remember that this plugin is exporting and importing your entire database. Not specific tables. So be sure to keep your files synced between environments too.
So what about migrating your WordPress files between environments?
The plugin can also handle the migration of WordPress’s core and theme files, plug-ins and uploads too. You can toggle what you do and don’t need through the advanced options.
However where possible I’m using Rsync with Github Actions to deal with moving files.
There’s a decent guide to getting started on the Smashing Magazine website. So if your interested in continuous deployment check it out here: https://css-tricks.com/continuous-deployments-for-wordpress-using-github-actions/