Two performance tips for WordPress migrations

Images are a total bottleneck when importing a site into WordPress.

Your script’s execution time can easily double if your migration script fetches images over HTTP or generates multiple thumbnail sizes. Because you’ll likely need to test your script multiple times, these inefficiencies can cause substantial delays in your project.

Fortunately, two simple tricks will save you a ton of time.

Continue reading “Two performance tips for WordPress migrations”

Verifying WordPress migrations

It seems like every time I do a migration with the WordPress importer, something about my data breaks. For instance, while writing my Year in Review post just now, I noticed last year’s post has an incorrect image:

2015-12-30 at 3.23 PM

The image should be the visualization.

It would be really neat if I could verify a migration with WP-CLI. Using the WXR file as the baseline, the command would iterate through all of the data in the file, compare it to what’s present in WordPress, and alert me if anything is missing or unexpectedly different.

Pre-flighting your WXR files

Thanks to a bunch of hard work by Thorsten and others, the open source CLI scripts we have for exporting and importing WordPress sites are getting better and better.

When exporting, the script gives you a summary of what will be included in your export file.

For importing, it would be nice if the script pre-flighted your data and told you how many total posts were to be imported, whether new tags were going to be created, identified the custom post types in your export file that were to be rejected by the site, etc.

Also, we should figure out a better way to make sure all of our internal scripts are regularly open sourced (and synced to most recent versions).