Media Files addon 1.3 & CLI addon 1.1 Released

By Brad Touesnard, Founder & CEO

YouTube cover image

We’ve put a lot of work into these releases and are happy to be sharing them with you finally. For a brief list of the changes, see the Media Files addon changelog or the CLI addon changelog. For the details, checkout the video above or continue reading.

The Media Files addon has been almost entirely rewritten. Customers with very large media libraries (100,000+ attachments) were running into timeouts with certain web hosting configurations. We had to redesign the whole process of comparing remote and local filesystems to accommodate the limitations of these servers. It took several iterations, but Iain did some solid coding and hammered home a solution we’re very happy with.

In previous versions there was no feedback during the comparison stage of the media file migration. It just said “Determining which media files to migrate, please wait…” and had a spinner.

Database progress of a WP Migrate DB Pro push migration

Now, you can see the progress of the comparison stage as it goes through batches of attachments (500 by default — can be changed with a filter) and a second progress bar shows the upload/download progress.

Media files progress of a WP Migrate DB Pro push migration

The new CLI addon is a huge improvement over the barebones first release. We’ve renamed the command to be more readable and introduced new push and pull subcommands. In 1.0, the command was:

$ wp wpmdb

The extra “wp” seemed a bit awkward. We considered just dropping it and making the command mdb, but it seemed too short and cryptic. We finally settled on migratedb:

$ wp migratedb

We’ve made the old wpmdb command an alias of the new command, so it’s fully backward compatible.

In version 1.0, we had a single subcommand:

$ wp wpmdb migrate <profile_id>

As we were introducing push and pull subcommands in 1.1, a migrate subcommand seemed a bit ambiguous and confusing. We decided to replace it with a profile subcommand:

$ wp migratedb profile <profile_id>

We plan to extend the profile subcommand to enable managing of profiles (e.g. list, add, remove) as well.

In version 1.0, you still needed to use the UI to create a profile before you could run a migration via the CLI. With the new push and pull subcommands this is no longer the case.

WP Migrate DB Pro command line usage

All the push/pull options you’re familiar with in the UI are available on the CLI allowing you to run any kind of push/pull migration from the CLI that you can run from the UI. And we’ve fully documented the commands in WP-CLI’s help format so you can view a full man page with details about each subcommand.

WP Migrate DB Pro command line man page

In version 1.0 the only feedback you got was “Success”. Sometimes even if the migration wasn’t successful. We now provide lots of feedback about the progress of your migration, including the progress of the media files comparison, and when there are errors.

WP Migrate DB Pro migration progress on the command line

The CLI addon documentation has been updated with the changes and full documentation of the subcommands and their options.

We’ve also released a new version (1.4.5) of WP Migrate DB Pro as some minor changes were needed to make it compatible with these new addons.

Next up, we’ve actually started work on the Multisite Tools addon that we’ve been promising for a long time. The first release will allow you to extract a subsite as an SQL file to create a new single-site install, automating the manual steps in our doc. We’re also working on a pro version of our Amazon S3 & CloudFront plugin.

About the Author

Brad Touesnard Founder & CEO

As founder of Delicious Brains Inc, Brad has worn many hats. He now spends most of his time managing the product teams and growing the business. Before starting this company, Brad was a freelance web developer, specializing in front-end development.