WP Migrate DB is a free WordPress script that runs in the dashboard as a plugin and creates a database dump while changing all the URLs and handling serialised data strings.
This plugin helps developers wanting to clone a WordPress website to a localhost such as WAMP or vice versa. Punch in your new destination URL and export the file.
You can save the exported WordPress database file to your computer as a gzip .SQL file and then import it into the destination website via a database management tool like phpMyAdmin or, if you prefer, the SSH tool PuTTY, which in my opinion generates the best, cleanest database exports.
Why Use the WP Migrate DB Plugin?
Usually, I build new client websites locally using WAMP, clone the database, replace the URLs, copy the website folder directory and install everything to the destination server.
This is what I call the manual method of exporting the .SQL from phpMyAdmin.
On this occasion, I had built the WordPress site WAMP (as per usual) but wanted to clone everything into an InstantWP installation for my client.
I followed common procedure and tried to replace the database URLs, as per usual, using the free script Search Replace DB without breaking serialised data.
All that needed to be done was to change the URLs from http://localhost/websitetest to http://127.0.0.1:4001/wordpress
WordPress Text Widgets Wiped Out
For some reason, on this occasion, the Search Replace DB script went wrong. The WordPress text widgets were wiped out on the destination server.
Everything else was there except text widgets in the header, sidebar, footer.
It wasn’t as though they’d been relegated to the “inactive widgets” area either, as is often the case when switching WordPress themes. The widgets simply weren’t there.
The data pertaining to them WAS still in the .SQL file which meant serialised data had been broken for text widgets in the course of me running the SRDB script.
I needed a solution. WP Migrate DB was the answer. In fact, I use WP Migrate DB 99% of the time now.
Old URL > New URL
WP Migrate DB will find and replace all URLs in your database as well as unserialising and reserialising. This is taken care of before the database dump actually takes place.Â
Any serialised data pertaining to text widgets is handled as a result.Â
If you’re migrating a https website to your localhost, be sure to enter http:Â in the replace field.
If you don’t you’ll end up with a database full of URLs that look like https://localhost/yoursite
and your site will not load in the localhost.
It seems WP Migrate DB is a fantastic choice and allows me to clone any WordPress website database on either a localhost or remote server and reproduce wherever I want.
But as you know, it depends on your “rig” – there are seemingly infinite combinations of software with WordPress and situations can differ hugely.
Summary: Amazing Lightweight Plugin for Moving a WP Database
This plugin is usually good enough, although recently I did have issues importing an exported database into phpMyAdmin on a Dreamhost shared host â errors were occurring so I had to use a different method. I don’t have the problem with other hosts. Must be a MySQL or phpMyAdmin version issue.
I’ve never used the paid version of this plugin â just the free one. If I was ever working on a site that required extra plugin features for moving the database, I’d be happy to pay for it.