Upgrading Ghost on Microsoft Azure

This site is a Ghost blog running as a Microsoft Azure Web Site. When I logged into the backend last week, I noticed that there was a new version available. Shiny! Let's upgrade this guy!

Hold on...there's no automatic updater yet. That's okay, they're only on version 0.4.2 and probably haven't been able to build that out yet. Looks like we're doing this manually.

Here's what you need to get beforehand:

  1. The latest version from the Ghost site.
  2. The upgrade installation guide.
    3.Access to your Microsoft Azure backend.

Step one is to set up FTP access for your site if you haven't done that already. In your site's Azure Dashboard section you should see "Set up deployment credentials". This lets you set up a FTP username and password. After you choose what you want your credentials to be, it will work for a while and then you'll see something like this:

Microsoft Azure Dashboard Options

The two things you need to pay attention to are the FTP Host Name and the FTP User. Use both of those things to log into the site via FTP.

From there, follow the instructions on the upgrade guide, and be sure to back up of course!

The final step, running npm install --production is a little tricky. You have to run that on the box that your website is installed on. But we don't have access to that in Microsoft Azure Web Sites...or do we?

Turns out there's a Kudu-based backend you can log into! Just go to http://yourazurewebsitename.scm.azurewebsites.net/DebugConsole and cd site\wwwroot your way into your site's root directory.

From there, run the npm install --production command and you will be done!

As a caveat, I got a "your server values are incorrect in config.js" error while running the final command. Turns out I needed to add the NODE_ENV = production variable to the Azure Web Site's app settings (under "Configure") before running the npm install --production command. It looks something like this:

Missing Node.js app setting

Good luck!