Ghost is a platform dedicated to one thing: Publishing. It’s beautifully designed, completely customisable and completely Open Source. Ghost allows you to write and publish your own blog, giving you the tools to make it easy and even fun to do.
The Ghost application is free. Free to use, free to modify, free to share, free to redistribute. You can do anything you like with the software, without legal restriction.
But I don’t want to modify it… I don’t want to redistribute it.. I just want to use it … without any installation or upgrading or anything… I just want to blog.
And than…. Ghost is not free!
Don’t get me wrong. I’m a “happy” Ghost user. I love the clean interface and I love the Markdown to write my Blog items.
But after using Ghost.org for my Blog for 6 months I wanted to go back to Blogger for two obvious reasons.
Reason 1: I don’t like paying twice !
Don’t get me wrong! I pay for many many things. Like my Lightroom license (bought upgrades from version to up to 5), I bought many many apps for my Android, iPhone and Macbook. And I pay on a monthly base for my DigitalOcean server!
So I’ve got my own server… why would I pay an extra 5 bucks for a blogging platform I can host myself. But I don’t want the hassle of updating my blogging platform every now and than. And I want my Blog te be secure with backups and all. Blogger does this all for your, withour paying a cent! (yes yes… free internet means that I’m the product)
Reason 2: Ghost.org doesn’t do a Good SEO job
Since I put my Blog on Ghost.org, visits went down like the Hindenberg in 1937!!!
SEO is bad on Ghost.org…. I had like 400 visitors a day on my Blog…. on Ghost it went down to 40 a MONTH!
So I decided that it was time to go back to Blogger.
Now, Ghost has a great tool to import your Blogger blogs. And Ghost actually has a Export tool to backup your own Blog. But! Blogger does not have a import tool for backups only made by… yes Blogger itself.
So I decided to make my own import tool. At first I created a XML generator from the JSON that Ghost exports. But with over 500 posts on my Blog, blogger does not seem to want to import the file. It can also be that Blogger just doesn’t want to eat the XML I created by their specs.
After trying a few XML files.. Blogger came up with another problem…. it told me I was trying to do to many imports a day… so I had to wait 24hours!
Okay…. that’s not going to work, I thought! But they have a API I connect to! Writing the PHP code to import all my Blogs by using the API I was happy to find another way for importing.
After my script was ready and run it for the first time…. another problem came up! Google and Blogger don’t like post flooding! Which means that you can only use the API for importing 50 posts on a daily base.
So I’ve rewritten my script to import 50 posts with the press of a link.
After this great journey from creating a XML generator to an API script importer, I thought it would be nice to share not only my knowledge about what you can and cann’t do with the Blogger import tool, but also to share the code I’ve written for connecting to the Blogger API.
Now, bare with me here, the code I’ve written will not win an Emmy award for best written code. It does not looks nice, it’s not OO and it does not have a lot of documentation. But it works for me. So you might want to rewrite parts for your self.
Next you need a few things to get this working.
First you need the Zend framework. I use this to create the connection
Second, if you use 2way authentication on your Google login you need an extra App login. The API (with oAUTH1.0) cannot handle 2way authentication. You can create an extra APP login in the Apps Passwords page.
And last but not least you need the following two php files.
Have fun importing your blog posts from Ghost.org to Blogger. I’ll be pressing the import link the next 11 days to import all 540 blog posts 🙂