Adventures in Migrating WordPress to Ghost Blog

Adventures in Migrating WordPress to Ghost Blog

I recently decided to migrate my blog from WordPress to Ghost Blog and I discovered a few nuggets of wisdom along the way. There are many reasons why I decided to move from WordPress to Ghost Blog, and there are many opinions about this subject on the web, so I won't bore you with the details for my decision but suffice it to mention that I was simply looking for a simpler way to get blog posts out to the web and Ghost Blog seem to fit the bill perfectly.

One of the goals for the new blog was to streamline the maintenance and development of content while still being able to easily track things like analytic data. Essentially these are the plugins I used in WordPress to run my blog before the migration:


In this post I will share some of my experiences migrating from WordPress to Ghost Blog, setting up Ghost Blog in Azure and a few more things in between related to hosting in Azure. However, this post is not meant to be a step by step tutorial on the subject. I simply wanted to share a bit of my experience, in case you are wondering why my blog looks different, and also tell you more about the wonders of markdown and Ghost Blog. :)

Preparing the migration

If look at the image above carefully you will see that I also added the 'Ghost' plugin on my WordPress installation. This was the key to easily exporting all my posts to the Ghost Blog markdown format. I also migrated all my media files to Cloudinary which proved to be a good option for a media hosting provider. Thus, essentially I made sure I decoupled my written content from any embedded images & media, which will prove useful in the future, more on this later.

Hosting in Azure

So I decide to host my Ghost Blog in Azure. Now, I want to be clear that I decided to host in Azure not because it is the easiest thing to do, on the contrary, it was a bit of a challenge just to get everything right at first, but I wanted to do this first migration by hosting it all in The Cloud and learn something in the process. However, in the future I will most likely be migrating my blog to the excellent hosted solution offered by the creators of Ghost Blog Pro. Thus, decoupling my written content from my media files was a next logical step. I recommend you do the same, and hopefully with the tips I will mention here your migration to the Ghost Blog Pro edition will be painless if you decide to do so someday. Another thing that I noticed is that some of the features mentioned in the Ghost Blog Pro Support Documentation Page are not available on the basic open source version. This is completely understandable since they are essentially compelling you to upgrade to the paid version, support their efforts and provide a more rich feature set out of the box. I am only mentioning this so you are aware of the shortcomings if you do decide to host it on your own provider. However, if you can get to the installation folder where Ghost is, then you can accomplish most of the tasks that are mentioned in the Ghost Pro documentation.

Goals for the migration

I had a number of goals in mind when migrating my blog from WordPress to Ghost Blog, some of those goals are still a work in progress but for the most part I have accomplished the basic goals I setup to attain, and here they are just to name a few:

  • Deploying blog in Azure
  • Using a custom domain
  • Using SSL
  • Tracking Google Analytics
  • Scheduling Backups

Deploy blog in Azure

Hosting in Azure was a simple decision since I am familiar with it and Azure makes things simpler, at least sometimes. I am using an azure web app service to host my blog, which I provisioned using the 'One Click Deploy' from this GitHub repository:
https://github.com/AzureWebApps/Ghost-Azure

![] (https://res.cloudinary.com/jpvelasco/image/upload/v1473919242/GitHub_Deploy_GhostBlog_oxbk1e.png)

This repository offers a very nice and easy way to install Ghost Blog on your Azure stack with a one click deploy!

![] (https://res.cloudinary.com/jpvelasco/image/upload/v1473919972/DeployingGhost2_xl7v9l.png)

After I clicked on the 'Deploy to Azure' button I just had to wait a bit until it was all done:

Once it was finished I could see the first page of the blog launch:

![] (https://res.cloudinary.com/jpvelasco/image/upload/v1473919243/WelcomeToGhost_fnjnvx.png)

Once the blog was deployed, I just needed to setup a new
administrator right away, so I just added the 'ghost' path to the host URL of my newly minted blog and signed up in under a minute!

You can do a few more things to setup the internal theme of your blog and such. If you are new to Ghost Blog I would recommend you head over to https://www.ghostforbeginners.com/ and look around at their site for useful articles. Pretty much all the information you need is there at your fingertips and it's a pretty well organized website, many kudos to
Andy Boutté and David Balderston You guys rock!!

Using a custom domain

Attaching a custom domain name to an Azure App Service these days is pretty straight forward. I simply followed the instructions here and everything worked fine: Map a custom domain name to an Azure app
All of this can be easily updated in the Azure Portal via a few simple clicks:

Using SSL

With the arrival of free domain certificate providers such as Let's Encrypt, other certificate providers have stepped up to the plate and are now offering high quality basic domain certificates for free. I got mine from Start SSL and it was a simple and painless process to obtain one. Then uploading it to Azure is simple as it is setting up the binding for the domain through an easy to use upload feature in the Azure portal.

Tracking Google Analytics

There is not much more I can add here as the guys at https://www.ghostforbeginners.com/ already have a great article and video on this subject, essentially Ghost Blog makes it really easy to add analytics to your blog by providing a simple way to inject the Google Analytics snippet from the admin page. For more information on this subject read this article: https://www.ghostforbeginners.com/how-to-add-google-analytics-to-ghost/

Scheduling Backups

I wanted to have an easy and simple and automated way to back up my blog, so I was glad to see that Azure App Service already has a section that allows you to backup the application to Blob Storage:

Azure App Service Backup

You simply click on the **Storage _ ** icon and follow the prompts to create a container, then you click on the **Schedule _ ** icon and choose the interval you want your backups to run at.

Summary

Running a Ghost Blog in Azure is possible and you can do it with a bit of effort and minimal out of pocket expenses. However, in the long run I believe the best way to host something like this will be using the Ghost Pro service. And I think this is what I will be doing in the near future, however, I anticipate that migrating from Ghost to Ghost will be a lot simpler and painless than hosting in Azure and having only myself to maintain the entire hosting process. In any case, I hope you enjoy the new look and feel of the blog. I will be adding Disqus again to my blog soon since unfortunately I wasn't able to migrate it with the first wave of requirements.
Until next time, happy ghosting!