I have been running Ghost 0.x in an Azure App Service with Windows Server. Now I am wanting to upgrade to Ghost 2.0 (using the Deploy to Azure from here.)
The upgrade path that I chose was to export all the data from my 0.x site and then to import that data into the new 2.x site. These were the three high-level steps:
- Export my blogs data: Log in to my LIVE 0.x site > Labs > Export
- Upgrade the export file: Run Ghost 1.8.0 locally > Labs > Import then Export
- Import my blogs data: Run Ghost 2.x locally > Labs > Import
That second step upgrades the 0.x export format to the 1.8 export format. That was necessary because the 0.x export format is not compatible with the 2.x import.
Step 1: Export my blogs data
Basically click the big blue EXPORT button.
Steps 2 and 3: upgrade and import my blogs data
The exported data from step one is not compatible with Ghost 2.x. We need to upgrade the exported data. We do that by importing the data into Ghost 1.8 and then exporting it. After that, we can import the data into 2.x.
export from 0.x > import to 1.8 > export from 1.8 > import to 2.x
Here is how I did that.
Then open a command prompt locally and run a clean instance of Ghost 1.8
git clone [email protected]:shaunluttin/Ghost-Azure-2.x.git git checkout 1.18.0 git clean -xfd yarn install node db.js yarn run start
Once Ghost 1.8 is running:
- In a browser go to http://localhost:2368/ghost
- Create your account (I used the exact settings from current 0.x blog).
- The Ghost admin panel will open.
- Go to Labs.
- First, delete all content (it's boilerplate).
- Then, import your Ghost 0.x export file (from Step 1).
- There will be some warnings. Decide whether to address them.
- Go to http://localhost:2368 to view the result.
- Return to http://localhost:2368/ghost/#/settings/labs and export.
You have successfully upgraded your 0.x export file to be compatible with Ghost 2.x.
Now, open a command prompt locally and run a clean instance of Ghost 2.x
git checkout azure git clean -xfd yarn install node db.js yarn run start
Repeat the import steps but this time import the 1.8 version of the file.
Step 4: Import your images
Images are not part of the Export feature. I downloaded them from Kudu at https://bigfontblog.scm.azurewebsites.net/DebugConsole/?shell=powershell
At this point simply click the download button.
Then extract the images.zip into the Ghost 2.x content/images directory. I use the
-force flat to overwrite the README.md file.
Expand-Archive ~\Downloads\images.zip content\images\ -Force
There are many paths to deployment. This was mine in Azure.
- Deployment > Deployment Slots. Add a slot named
Upgradewith settings copied from the existing site.
- Deployment > Deployment Center. Add Github with Kudu and point it at the
azurebranch of my fork.
Once deployment completes, go to https://bigfontblog-upgrade.azurewebsites.net to see the result.
Then use FTP to copy the local 2.0 content to the slot. That includes these local files.
Here is how to find your App Service's FTP credentials: https://stackoverflow.com/a/54151950/1108891
The final step is to Swap the two deployments slots and then, once the swap completes, to delete the slot named Upgrade. This is how my Deployment slots blade looks after the swap is complete.