Migrating a WordPress site from Blacknight to Azure: Part 1/2

This is the first post in a three part series. I’m moving my Blacknight WordPress sites to Azure to see if it improves speed and if it’s cheaper. I’ll have to retain the Blacknight subscription while I have the domains registered with them. Will consider moving the domains to Azure using App Services Domain. This document will show you how to create a WordPress site on Azure App Services, you will use this site to test the redirect, access your DNS records in Blacknight, and configure and manage custom domains. In part 2 I will be investigating using Powershell to automate the renewal of SSL certificates. Azure might have some out of the box function for this but I haven’t checked yet. Enjoy.

[Note: The Blacknight specific sections for backing up your site have not been tested. So please verify that you back up properly before proceeding and consider special cases like out of date WordPress versions]

Creating a WordPress site on Azure App Services

  1. Navigate to portal.azure.com and log on.
  2. Input WordPress in the Search resources, services, and docs (G+/) search bar.
  3. Click WordPress under the Marketplace results.
  4. Create a name for your site. Note: The end result is your WordPress site URL so bear this in mind if you are not redirecting the site.
  5. Select all the defaults except for the Database Provider. From the Database Provider drop-down menu, select MySQL In App.
  6. Click App Service plan/Location and in the App Service plan/Location window click Create new. Note: The content in the App Service plan/Location window will disappear.
  7. In the WordPress window, click Create. Note: The application will take several minutes to build. To check the build status, click the notification icon.
  8. Click the notification icon and if the build is complete, click Go to resource.
  1.  

Finding your WordPress site ID in Blacknight

You need your WordPress ID to download your database and backup your WordPress site. To find your WordPress site ID complete the following steps:

  1. Navigate to www.blacknight.com and log on.
  2. Click Websites, and click the relevant website.
  3. Click Web Applications.
  4. Copy the number under the ID column.

Downloading your WordPress database from Blacknight

  1. Navigate to www.blacknight.com and log on.
  2. Click Websites, and click the website you want to redirect.
  3. Navigate to More Services and click Databases.
  4. In the Database name column, look for a name that contains your WordPress site ID and click it.
  5. Click the Browser database manager URL. This brings you to phpMyAdmin.
  6. Click Export.
  7. Click Go.

Restoring your SQL database in Azure

  1. In Azure navigate to Home > [your WordPress site] App Service.
  2. In the App Service menu click MySQL In App.
  3. Click Manage. This brings you to phpMyAdmin.
  4. Click Import.
  5. Navigate to Browse your computer and click Choose File
  6. Select your SQL backup file.
  7. Click Go.

Connecting to your Blacknight FTP and backing up your WordPress site

  1. Navigate to www.blacknight.com and log on.
  2. Click Websites, and click the website you want to access using FTP.
  3. Click FTP Access.
  4. Copy the FTP Server link.
  5. Open Windows Explorer.
  6. Paste the link in the address bar.
  7. Navigate to webspace/siteapps/WordPress-[your ID].
  8. Create a folder on your desktop called Temp Backup Folder.
  9. Copy the WordPress-[your ID] folder and paste it into the Temp Backup Folder.

Connecting to your Azure FTP

  1. In Azure navigate to Home > [your WordPress site] App Service.
  2. Click Get publish profile. This downloads your FTP details.
  3. Open the file in your preferred editor.
  4. Copy the publishUrl and paste it into Windows Explorer.
  5. To find your username and password, search for userName and userPwd.

Migrating your Blacknight backup to Azure via FTP

  1. Navigate to your Temp Backup Folder on the desktop and go to htdocs: Temp Backup Folder\WordPress-[ID]\htdocs.
  2. Paste the files into your Azure FTP site/wwwroot folder.

Note: If you are having trouble copying the files and folders, migrate them one at a time to see which one is causing the problem.

Accessing your DNS records in Blacknight

  1. Open a new tab, navigate to www.blacknight.com and log on.
  2. Click Websites, and click the website you want to redirect.
  3. Click the DNS tab.
  4. Click DNS records.
  5. Click Add New DNS Record.
  6. In the DNS Record Type drop-down menu select CNAME.
  7. You can leave the Domain field blank or input www.
  8. In the Canonical name field, input the domain you want to redirect it to. For example, [your site].azurewebsites.net. You must include a period at the end of your URL.

Note: “DNS record successfully scheduled for addition.” should appear. If not, contact Blacknight for information on deactivating your other nameservers.

Configuring and managing Azure Custom domains

  1. In Azure navigate to Home > [your WordPress site] App Service.
  2. In the App Service menu click Custom domains.
  3. In the Custom domains page of the app, add the fully qualified custom DNS name www.[yoursite].[your TLD] to the list.
  4. Click the + icon next to Add custom domain.
  5. Enter your fully qualified domain name, for example, www.[yoursite].[your TLD].
  6. Click Validate.
  7. Make sure that Hostname record type is set to CNAME (www.example.com or any subdomain).
  8. Click Add custom domain. It might take some time for the new custom domain to be reflected in the app’s Custom domains page. Try refreshing the browser to update the data.

Note: Depending on your DNS provider it can take up to 48 hours for the DNS entry changes to propagate. To verify that the DNS propagation is working as expected navigate to http://digwebinterface.com