Hackernoon logoHow I Moved My Blog From WordPress to Cosmic JS by@carsoncgibbons

How I Moved My Blog From WordPress to Cosmic JS

Carson Gibbons Hacker Noon profile picture

@carsoncgibbonsCarson Gibbons

Cosmic JS Co-Founder

In this blog post I will tell you how I migrated my blog content from WordPress to its new happy cloud-content-powered home on Cosmic JS. Cosmic JS offers an intuitive API that can deliver content to any website or application, giving you the freedom to build your application using any programming language while allowing for easier scaling within your development team.

Cosmic JS offers a streamlined editing experience that gives you everything you need to publish content quickly and easily. Since there is no CMS installation, you can easily build content in any phase of development and avoid unnecessary process bottlenecks.


The first step I had to take was to export the data out of my old blog. Since Cosmic JS makes it super easy to import data into a bucket, all I had to do was find a WordPress plugin that exports WordPress data into a JSON file that is properly formatted to import into a Cosmic JS bucket. Luckily such a plugin exists :) https://github.com/cosmicjs/cosmicjs-wp-export. After installing the plugin, all I had to do was select which post types I wanted to export then click export. This gave me one JSON file with all of the data I needed to perform the migration into Cosmic JS.


The next step was importing the data into Cosmic JS. To import into a new bucket, I created a new bucket and navigated to Bucket > Settings > Import / Export Data. Then I just dragged the JSON file that I exported from WP onto the page and within seconds my data (AND FILES!) were imported into my bucket. (Plugins are not imported)


My next task was to build a new blog app. The app I chose was the Future Imperfect app available on the Cosmic JS Apps page. It has a sleek, modern front end (designed by @n33co at HTML5UP.net) and is built on top of a light-weight Node.js server (goodbye PHP!). I forked the Future Imperfect app from the GitHub repo and edited it to suite my needs. The Cosmic JS NPM module made it easy to pull the content in from the Cosmic JS API into its new JavaScript backend. The mustache templates (Hogan) became the perfect compliment with the name-spaced object properties provided by the Cosmic JS JavaScript client, for example: {{ cosmic.object.nav.metafield.site-title.value }}, how easy is that?!?


The next and final step was to deploy the application for the world to see and marvel! I decided to deploy my new blog app using the deploy feature in my Cosmic JS bucket. The path to do so is Bucket > Settings > Deploy Web App. It was really easy to add the public GitHub url for my new blog and click Deploy! Within a few minutes my new blog was deployed and out in the world.

I’m happy to say that the blog you are reading right now is built on this new easy-to-manage, fast Node.js / Cosmic JS application stack! With this new setup my blog is now much faster and performs much better on page speed tests. This is because my blog now runs on a light server / CMS API stack rather than a heavy stack of installed applications and plugins.

I hope you’ve enjoyed my story of how I freed my content from the confines of an installed CMS. Create a free Cosmic JS account today and see how easy it is to free your content! Let me know if you have any questions or comments in the comment section below. You can also reach out to me on Twitter.

Compare Cosmic JS to WordPress

Cosmic JS is an API-first cloud-based content management platform that makes it easy to manage applications and content. If you have questions about the Cosmic JS API, please reach out to the founders on Twitter or Slack.


Join Hacker Noon

Create your free account to unlock your custom reading experience.