So as i am starting a new job in less then 2 months, i thought it was time to move this site from a Virtual Machine running on my current employers S2D cluster to Azure. So i decided to share my way there. So i started googling on how to do this. There where some guides here and there. Some older ones and one from docs.microsoft.com, this one did not move everything. So i started with one, got a timeout error. Tried another did not work.
Then i found a plugin called All-in-One WP Migration. It looked quite straight forward and it was. By far the easiest one i tried. It took a while to export and import. But it went like a charm.
So first i installed and activated the plugin on my wordpress site. Then i went to the plugin and clicked on export.
Here you have the option of different way’s to export the files. I chose File and downloaded it once it was done. It took about 5 minutes or so. Mine was about 265mb. You will need a licence if it’s bigger then 512mb to import it.
Now while the export is running, you can setup your azure wordpress site. If you don’t have a Subscription, create one. Now i have a MSDN subscription giving me 150 USD. But for the Mysql database i used i needed to put a credit card on the subscription for it to work, as my DB size was bigger then the 20mb free that comes with it. This is something you can do on your accounts page, accounts.microsoft.com. Then add a credit card to it there. This will take 10-15 min before will be visible in azure.
So i created a new resource group in azure, in West Europe.
Then i went into the resource group and clicked on the +Add on the top
Search for WordPress and choose the first one from WordPress. This will give you an option to install the Mysql app as well.
Once you go out to fill inn the data, your app name need to be unique. Now i am using the new Resource Group i created. And i am choosing ClearDB. And i create a new App Service Plan, as i can choose the location to West Europe and not South US as the default is. And also the pricing tier. For most the B1 Basic will work. This site is running on that now.
Now let’s choose the database, click on it and create a new. Now you can choose the name, if it’s shared, the location(Important to put all in the same data center) and the pricing tier. Now what you will see here is that it’s not available for me as a MSDN subscription on the initial setup. But i can change that after i set i create the wordpress site. Titan or Venus should be enough for most small wordpress sites.
Then click the review legal terms and click purchase then ok and create
Now your export should be finished and you can save the file.
To Scale up the ClearDB to a bigger size go into the Mysqldb app
Then go to Scale up Database
Click on the tier you want, and click select on the bottom. Now it will scale it up.
As soon as your wordpress site is done go into the newly created app service
At the top right there is a link to the url for the new site. Click on it and setup the new wordpress site.
Now setup wordpress as you would the first time.
Now go to plugins and install the All-In-One WP Migration again. This time click on the import button. Then drag the downloaded file to the import window.
This will take a while, and after it is done you will be logged out. Now you can log back in with the same credentials as your old site. Once you have checked that all is ok. You can go to the azure webapp and set the custom dns domain name for your site. And then go to your DNS hosting provider and update the IP address of the site.
Fill out the information of your domain name, and update your dns with a A record, and a txt record for faster registration of the domain. As soon as the DNS change is done, you will be able to access it with your custom domain name like before.
And that’s how simple it is 🙂 Stay tuned for more Azure fun stuff on my blog in the future as i start my new career as a Consultant.