Pikiran, Ide, dan Gagasan

Update Ghost 0.9.0 Using Openshift Quickstart

Ghost recently released a new version of the CMS, and again, here are the steps or tutorial on how to update your Ghost to the version 0.9.0 for the users of Openshift Quickstart. This is the easier way to update your Ghost rather than this one I wrote before.

I assume that you already have a clone of your application (blog) in your local machine.

At first, I suggest you to take a look at the ‘update’ section below before doing the upgrade. Please 1.

Backup

Remember to always do a backup first before doing an upgrade. I suggest you to make a backup from your blog and your whole openshift gear (your application).

  1. Go to your blog dashboard > Labs > then hit the Export button. This will export your settings and your content to a json file that you can import whenever you need it.
  2. Make a snapshot of your cartridge by using this command in your terminal rhc snapshot save <app_name>. You can read about this in here.

Update

  • Find the file named package.json right in your App’s root directory. Remember. This is not the same file that you can find in /node_modules/ghost/. Open that file then you’ll see a short number of lines like this
"dependencies": {
        "ghost": "^x.x.x"
    }
  • . The x.x.x indicates the version of your ghost. Change it to the last version of the ghost, which is 0.9.0. save it.
  • After that, open your own ghost application folder in terminal by hitting cd <your-application-folder>, then run the command npm update.

This action will automatically update all the necessary Ghost files for your blog.

Push the changes

After all of the actions done.
Then

git add .  
git commit -m "Update to Ghost 0.9.0"  
git push  

Update: If your blog failed to start or if you face an error like this one Failed to execute: 'control restart' for /var/lib/app_root/myID/index.js. Please do the steps below before updating your ghost.

  1. Simply open the file named package.json in folder /node_modules/ghost/.
  2. Find the line "main": "./core/index", change it to be "main": "./core/index.js" and save it.

8 responses to “Update Ghost 0.9.0 Using Openshift Quickstart”

  1. Sibelius Avatar
    Sibelius

    Thanks mate! Didn’t know the package.json part and wondered why it’s not working that way

    1. Sasono Avatar
      Sasono

      Sorry. Could you explain it clearer? I already have updated the core to 0.11.3. Also with the same way.

  2. fugabi Avatar
    fugabi

    right! the simplest and most efficient way to do it. thanks!

  3. Tomas Kupka Avatar
    Tomas Kupka

    Hi Noreta! thanks again for this tutorial. I’ve got a question where I’m not sure before I continue…the “npm update” command is done locally before “git push” or on the openshift via terminal? Thnx Tomas

    1. Sasono Avatar
      Sasono

      I did that locally. I already have updated the core to 0.11.3. Also with the same way.

  4. Tomas Kupka Avatar
    Tomas Kupka

    ok sounds great, btw. do you have some insights how it will be with further nodejs support by OpenShift? Right I have there the lowest version of nodejs (0.10) installed by the Ghost basic package. Ghost is not supporting anymore this version of nodejs. Is there some trick to use latest nodejs on the OpenShift to continue using latest Ghost? Many thanks! Tomas

    1. Sasono Avatar
      Sasono
  5. Update Ghost 0.11.3 [Openshift] – Noreta Agus Sasono

    […] I also try to explain it briefly as I assume that you have read the others posts I wrote before here and […]

Leave a Reply

Your email address will not be published. Required fields are marked *