So, how did we do that blog move? Part 2

Welcome to part 2 of my post about moving the TopQore blog, twice!

Here in part 2 we will cover the 2020 move to Azure public cloud and putting the blog under our new subdomain.

Come early 2020, BICTT is now TopQore and our blog is now on the old domain! We have two options –

1. Bring the blog under topqore.com/blogs

2. Create a new subdomain blog.topqore.com and move it there.

Can you guess which one we picked?

Yes, we opted to bring the blog under a subdomain and host on Azure public cloud instead of our own private cloud where the previous blog was located.

First I provisioned a Windows VM and installed all the required roles and features, being IIS and MySQL along with a few other IIS features such as rewrites.

Now I needed to migrate the previous blog over to this new server, easier said than done, this was a challenge for multiple reasons including :

  • Old instance was a WordPress multi site that only needed the blog sub site splitting off and bringing across
  • Lots of legacy redirects on the old webserver from the original B2 evolution blog move in late 2017
  • Moving to the blog.topqore.com subdomain meant further redirects needed to be created
  • Some other anomalies we discovered…

So lets tackle each of these points…

 

Old instance was a WordPress multi site that only needed the blog sub site splitting off and bringing across

This part turned out to be surprisingly painless.

First, I exported a copy of all WordPress posts, pages, comments, custom fields, categories, and tags using the built in WordPress export tool.

This gave me an XML file containing nearly all the site data we needed, apart from media, plugins and the theme.

To get the media, plugins and theme it was a case of simply making a copy of the \wp-content\uploads\, \wp-content\plugins\ and \wp-content\themes\ directories.

Once all the above was completed I was left with a copy of all the important WordPress data which I can later import.

 

Lots of legacy redirects on the old webserver from the original B2 evolution blog move in late 2017 & Moving to the blog.topqore.com subdomain meant further redirects needed to be created

In part 1 of this post you saw me create a series of 3 redirects to redirect our old B2 Evolution blog over to the then new WordPress multisite.

This posed a challenge when bringing the site under the TopQore domain, so how did we manage it?

The answer is actually relatively simple…

First we created a redirect site in IIS and made it the default site for the web server IP address, meaning anything pointing to the web server IP that we had not specifically said would run a simple redirect rule to the https://topqore.com main site.

So for example if I typed an old blog URL e.g https://www.bictt.com/blogs/bictt.php/2009/03/17/sql-reporting-services-render-pdf-in-a4-1 this would be redirected to https://topqore.com/blogs/bictt.php/2009/03/17/sql-reporting-services-render-pdf-in-a4-1

Then, under the topqore.com main site I copied all the redirect rules we previously setup except I changed the redirect location to https://blog.topqore.com.

I also created two extra rules, they are –

Rule #1  – /blogs/* to https://blog.topqore.com/*

This rule allows any traffic destined for just the old /blogs to be forwarded to the new subdomain.

Rule #2 – /blogs/ to https://blog.topqore.com/

Same as above, except without the wildcard, so a straight redirect from a sub folder to subdomain.

 

So the complete redirect flow for an old URL is as follows :

https://www.bictt.com/blogs/bictt.php/2009/03/17/sql-reporting-services-render-pdf-in-a4-1

to

https://topqore.com/blogs/bictt.php/2009/03/17/sql-reporting-services-render-pdf-in-a4-1

to

https://blog.topqore.com/sql-reporting-services-render-pdf-in-a4-1

 

Some other anomalies we discovered…

As with every large migration project, issues were discovered, in our case in the form of broken links in both text and media.

We were able to quickly discover these broken links with the help of a WordPress plugin which then allowed us to replace accordingly.

In one instance some media had actually seemed to not only link incorrectly but not even exist on the new server!

After some investigation it seems this media was not copied across during the original move, luckily we still had copies of this media on our old server.

So after a quick copy and changing some file paths the images were once again displayed!

 

And that’s it! Old to new.

We now have a solid foundation for our blog URLs to move into the future with. By hosting on a subdomain we can easily update our blog hosting independent of our main site hosting.

Hope you enjoyed these couple of posts on how we did this move, as always, the key is planning!