It’s been far too long since I’ve posted. I have about 10 posts in draft format, but there’s just too little time to work on them when the weather is beautiful. Summer is too short in Ontario…
This is just a quick guide for upgrading WordPress on Project Nami. As I wrote in my first blog post, this blog is hosted entirely in Azure, as a sort of technical exercise for myself to learn how to host a simple web application in Azure. Project Nami enables the WordPress engine to run on top of Azure SQL DB instead of using MySQL, as MySQL is not a fully native PaaS capability in Azure.
If you’ve deployed using the “Deploy to Azure” button on the Project Nami site, the process is really easy:
- Sign into your Azure subscription (portal.azure.com)
- Find the web application hosting your site – remember, the icon looks like this: . In my case, the App Service Plan has the same name and I click on the wrong thing briefly.
- Select “Deployment Source” blade:
- Next, select the “Sync” button and click Yes – this will start the upgrade process:
- You can click on the Deployment popup in the portal and view the progress:
- Once it’s successful, you can view this state here:
You may need to restart the web application for the upgrade to take effect.
This is all enabled with the wonderful continuous deployment from GitHub capability that is native to Azure Web apps. Using deployment slots enables you to quickly test a build – the web server is warmed up and ready to go as soon as you cut it over, so your users hardly notice the difference between builds. If a bug slipped past your testing, it’s easy to return to the previous version of the application. A more advanced use of Deployment Slots is to deploy a few versions of your application into production, and, using the instrumentation provided by Application Insights (or the tool of your choice), determine the best version of the site to host.
Joe Gasper
Thanks, Nicholas.
You can also do this with a bit of PowerShell.
https://gist.github.com/joegasper/f1acdfa0f601088497d60ea0a255f5e8
Import-Module AzureRM.Websites
Login-AzureRmAccount
$MyResourceGroup = ‘myresourcegroupname’
$MyResourceName = ‘myresourcename’
Invoke-AzureRmResourceAction -ResourceGroupName $MyResourceGroup -ResourceType Microsoft.Web/sites -ResourceName $MyResourceName -Action sync -ApiVersion 2015-08-01 -Force -Verbose