Several months ago, I wrote about the wonders of WP Migrate DB Pro, a plugin that makes copying the database from one site to another as easy as pie. I fell in love with how useful it was, especially as a developer, and I have been raving about it ever since (read my original review).
Well, a few weeks ago, Brad and Chris released an update to WP Migrate DB Pro which incorporates an incredibly useful new feature: Media Library migration.
In addition to being able to completely migrate a database from one site to another without having to worry about changing URLs, paths and serialised data, you can now migrate the entire media library from your source site to the destination site.
How to do it
With WP Migrate DB Pro already installed and activated, you’ll notice the Addons tab at the top of the WP Migrate DB Pro settings page, which lists the Media Files addon. You’ll need to install that on both the source and destination sites.
From there, it’s merely a case of checking an extra box when preparing the migration to indicate whether or not you wish to migrate the media library from the source site to your destination site.
You have the additional option of removing media files from the destination site if they don’t exist on the source site as well, to make a true copy of the source site (rather than adding to whatever exists in the destination site).
Then, when you initiate the transfer, the database migrates as usual, and a second progress bar appears, showing the progress of the media library transfer.
When I tried it out, I was impressed at how quickly it zipped through all of my media files. It should be noted that it migrates all of the different image sizes as well as the original, so while you may have 50 items in your media library, there may be several hundred files to transfer, so you can rest assured that all of your files and images will be present on your newly migrated site. Sweet!
This is an excellent next step in the development of WP Migrate DB Pro. However, for me, there’s a couple of pitfalls. Since it’s only transferring your media library (which should be the entire contents of wp-content/uploads), it doesn’t transfer your themes or plugins, so for a complete site migration, you’d still have to move those over manually, which is actually a little more awkward now that you’re zipping up and moving wp-content/plugins and wp-content/themes instead of just the whole wp-content folder.
Additionally, if entries in your media library were deleted without deleting the actual file, which is still linked from somewhere, my guess is that that file wouldn’t be migrated, since the file isn’t listed in the media library (this is an unlikely, but plausible, problem).
Nonetheless, it’s an excellent addition and it certainly does the job with grace, which is something that Brad considered heavily when developing this feature (as heard on Apply Filters). I hope that they’ll consider adding themes and plugins to the mix in their next update to make this an even more invaluable tool for users and developers alike.
If you’re thinking about getting a license for WP Migrate DB Pro, be sure to use coupon SUPER20 when you check out, to save 20% on the cost of every license.