If you have been following Ghost Pi and have installed Ghost 1.x on your Raspberry Pi or ASUS Tinker Board, then you know how unnerving it can be when an update is released.
UPDATE - 17 April 2018:
The memory issue has since been resolved in version 1.7.0 of the Ghost-CLI tool, meaning you no longer need to use the
--no-check-mem parameter. However, if you are on a previous version of the Ghost-CLI tool and have the issue, please read on or update to the latest version.
Updating Ghost on Raspbian
Whenever we see an update available in the Ghost admin panel, we are part excited to see what new features have been added or which bugs have been squashed, but part of us dreads seeing the update notification in case we go ahead and then break our blog as a result.
Things would be so much simpler if the guys and gals over at Ghost HQ officially supported a Raspberry Pi version, but until then Ghost Pi has been happy to help wherever possible.
Backup before update
As with any update, a smart blogger will make a backup of their blog before going ahead just in case things go wrong. You all do that right? Excellent! Ghost Pi highly recommends you do the same, just so that you can restore quickly in case the worst happens.
Backing up your Ghost blog is simple - log into the admin panel, browse to the "Labs" area and then use the "Export your content" option to download a JSON file that contains all the information about your blog.
Updating the Ghost-CLI tool
Sometimes, you may need to update the Ghost-CLI tool before proceeding with the update to your actual blog itself. To do this, you just need to repeat the step for installing the Ghost-CLI tool when you installed it on your Raspberry Pi or ASUS Tinker Board the first time around:
boo@ghostpi ~ $ sudo npm i -g ghost-cli@latest
This command will download and install the latest version of the Ghost-CLI tool, but you can also install a specific version by running a similar command, but instead of specifying the
latest you specify the version you want instead, for example:
boo@ghostpi ~ $ sudo npm i -g [email protected]
This will install version
1.5.2 of the Ghost-CLI tool. To see a list of releases, head over to the Ghost-CLI GitHub page for details.
Fixing the "memory" issue when updating Ghost
1.6.0 of the Ghost-CLI tool, a new memory availability check was added to provide additional error handling measures. Unfortunately, on low-memory devices such as the Raspberry Pi or ASUS Tinker Board, this causes update issues when running
Thankfully, the clever developers at Ghost thought about this and have included a parameter that allows you to bypass the memory availability check, which means you can continue to update Ghost to the latest version without issue!
Bypass the "memory availability" issue on Ghost
To prevent the Ghost-CLI tool from failing the update due to "memory availability" issues, you just need to add the
--no-check-mem flag to the update command:
boo@ghostpi ~ $ ghost update --no-check-mem
This will now run the Ghost update command, but will skip the memory availability check and will allow you to update your Ghost blog to the latest version!
If you found this guide, as well as any other guides on Ghost Pi helpful, then if you wanted to buy Ghost Pi a coffee to show your support, then that would be greatly appreciated! As this site does not use any form of adverts, all the costs for running and maintaining the blog are done voluntarily so any extra would be fantastic!