Migrate Ghost from 0.11 to 1.0
Ghost 1.0 officially released today, and for this occasion I migrate my website.
Ghost run now with Nginx and MySQL by default. My website run with Apache and I want to keep my Sqlite database.
Since this version, Ghost is installed through Ghost-cli which is a new tool to install and manage your Ghost web application.
Backup and Node version
Before going further, backup your website and check your Node and npm version. Ghost 1.0.0 currently supports Node versions 6.9+ and 4.5+ only.
You also need to back up all your old posts / images and theme.
- JSON export from your website Settings -> Labs -> Export
- Backup your content folder
Source : Migrating to 1.0.0
For this tutorial I will you my website as an example. This website is running on a Debian instance and the web application is in a folder called "piratefache.ch". The current version of Ghost is 0.11.11 and it will be updated to 1.0.2.
- Rename your current website (for me: piratefache.ch_0.11.11)
- Create a new folder (piratefache.ch)
Install Ghost-Cli
npm install -g ghost-cli@latest
Create your web application
ghost install local
ghost install
(for a production Linux setup, including Nginx, SSL, and Systemd)ghost install local
(for a local setup, useful for theme development/testing)
As you can see, I run it "locally", because I want to skip the Mysql integration.
If the installation goes well, you should see that:
Node is automatically running after the installation finished on http://localhost on port 2368. As Apache was already configured, the website was already available.
Configuration file
Open "config.development.json" file and check the configuration (particularly "url" and "server" information). If you need to change something, don't forget to restart Ghost with this command line : ghost restart
.
Migrate your data
1. Content
On Settings -> Labs -> Import content your can import the json file exported earlier.
2. Images
Copy your images to your new site:
cd your_new_website
cp -r old_website/content/images/* content/images/
3. (Optional) Migrate your theme
If you had a theme, you can migrate it : Settings -> Design -> Theme.
Before to upload your theme, you can check if it will run correctly on Ghost 1.0 using this website :
If an error occured, you will see a very detailed explanation about how to fix it. You can also take a look a the documentation about how to migrate your theme : Migrating themes to 1.0.0
That's it!
Congratulations! You migrate your website successfully x) Enjoy your new website!
How to update Ghost 1.0
One great functionality about Ghost 1.0 is the update integration. With the command line ghost update
your website will automatically be updated! No more download / backup / re-run node, etc ! Hooray !