awsghost

Upgrade Ghost

How to upgrade Ghost 1.x onwards

NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:

 $ test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."

The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.

  • Create a backup of your Ghost installation.

  • Update the Ghost CLI

  • In the Ghost installation directory, execute the update command as follows:

    • Approach A (Bitnami installations using system packages):

        $ cd /opt/bitnami/ghost
        $ sudo su ghost ghost update
      
    • Approach B (Self-contained Bitnami installations):

        $ cd /opt/bitnami/apps/ghost/htdocs/
        $ sudo su bitnami ghost update
      
  • To finish the update, modify file permissions:

    • Approach A (Bitnami installations using system packages):

        $ sudo chown ghost:bitnami -R /opt/bitnami/ghost
        $ sudo chmod 640 /opt/bitnami/ghost/config.production.json
      
    • Approach B (Self-contained Bitnami installations):

        $ cd /opt/bitnami/apps/ghost
        $ sudo chown bitnami:daemon -R ./htdocs ./conf/ ./bin/
        $ sudo find ./htdocs -type f -exec chmod 664 {} \;
        $ sudo find ./htdocs -type d -exec chmod 775 {} \;
        $ sudo chmod 640 ./htdocs/config.production.json
      

Congratulations! Your Ghost installation has been updated!

How to upgrade Ghost from 0.x to 1.x

If you already have an older running version of Bitnami Ghost, you can update your application by following these simple steps:

  • Create a backup of your Ghost installation.

  • In your existing (pre v1.0.0) Ghost blog, navigate to the “Settings -> Labs” section and click on the “Export” button.

    Ghost content export

    This will download in your system your JSON export file that you need later.

  • Launch a new Bitnami Ghost instance.

  • Import your content into your new Ghost instance.

  • In the new blog navigate to the “Settings -> Labs” section. Click “Choose file” and select the JSON export file created before from your system, then click “Import”.

    Ghost content import

    NOTE: Please note that Ghost importer will not import themes. You could see a warning that your themes have not been imported, that is the normal behaviour, you can continue to the next step.

  • Copy your images from your existing directory /opt/bitnami/apps/ghost/htdocs/content/images to the new instance directory /opt/bitnami/apps/ghost/htdocs/current/content/images.

  • Move or upload your themes. To do so, navigate to the “Settings -> Design” section and click the “Upload a Theme” button. Follow the instructions.

    Ghost themes

Now you have your system fully migrated to the newest Ghost version!

Last modification July 7, 2021