How we migrated the Taproot Publishing blog

Last week, we setup a new blog for Taproot Publishing. It’s one of many things we’re doing to better reflect what we envision for Taproot Publishing, the umbrella organization that publishes Taproot Edmonton, our B2B information products, and more projects in the future.

We already had a blog at the Taproot Edmonton site, and we didn’t want to lose what was there. It was important to us to have our existing posts migrated across to the new blog. We also wanted to make sure any existing links would continue to work correctly.

I’m going to share some of the details on how we did that. We’ve often benefited from the lessons and experiences shared by other media startups, so hopefully someone else will find this helpful.

Initial setup

The taprootedmonton.ca site currently runs on WordPress, self-hosted in Azure. We decided that we didn’t want to self-host the new blog, so we created a new site at WordPress.com and configured blog.taprootpublishing.ca to point to it. We went with WordPress Premium to start.

Thankfully we had picked a theme that is available to WordPress.com sites (Independent Publisher 2) so we configured that and copied over all the styles so it would look pretty similar to what we had before.

The other thing we did was add myself and Karen as users. You’ll want to add any users from the existing site into the new one before you do the post migration, so that you can keep the correct bylines (unless you’re fine with changing those).

Post migration

The next task was to export the posts from our existing site and import them into the new site. While WordPress has built-in functionality for import/export, we discovered it has some limitations. In particular, unless you choose to export "all content", you’re not going to get the featured images that go along with each post.

To solve that, we installed the Export media with selected content plugin to our existing site, so that the featured images could be referenced in the export file.

The export file is just XML though, it doesn’t contain the images themselves. We thought about simply copying the existing uploads folder over to the uploads folder of the new site, but alas, you need to be on the WordPress Business plan or higher for that to work. So we decided to copy them instead to a container in Azure blob storage.

Next, we did a find and replace on the "wp-content/uploads" URLs referenced inside the export file, to instead point them to the new location in Azure blob storage.

Finally, we used the WordPress importer to bring our posts into the new site.

Redirecting old URLs

At this point, our new site was up and running with our previous theme and all of our existing blog posts loading correctly. The next step was to make sure that if someone visited the old URL, at taprootedmonton.ca, that they’d be redirected to the new URL, at blog.taprootpublishing.ca.

To do that, we installed the Redirection plugin to our existing site.

The plugin is both easy-to-use and powerful. You can specific the exact URLs you want to redirect, or you can use regex to match a number of URLs at once. The plugin also lets you choose what to do with any query parameters (such as utm tags that might be appended to your URL). Of course, you can also specify whether the redirects are temporary (302) or permanent (301).

With the redirects all in place, testing was all that was left to do. I realized during my testing that there are other URLs besides the posts to redirect, such as the root /blog and tag or category pages, so don’t forget about those!

Final thoughts

The last step was to update the taprootedmonton.ca site menu to point to the new URL. With that, our new blog is setup and ready to help us tell the story of Taproot Publishing!

I’ve moved my personal blog around a number of times over the years, so maybe that’s why this project felt a little like going back in time! This move was all about the future though, and I am excited to get on with the next task.

Feel free to reach out should you have any questions about how we completed the blog migration!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s