HowTo Upgrade Your Ghost Version


1. 下载最新版的Ghost

1
curl -LOk https://ghost.org/zip/ghost-latest.zip

2. 创建临时目录,并解压ghost-latest.zip到此

1
2
mkdir /usr/ghost-tmp
unzip ghost-latest.zip -d /usr/ghost-tmp

3. 进入到原ghost目录,删除core

1
2
cd  /usr/ghost
rm -rf core

4.进入到新版本的ghost临时目录

1
cd /usr/ghost-tmp

5. 拷贝所需文件到ghost升级目录

1
2
cp -R core /usr/ghost
cp index.js *.json /usr/ghost

6. (可选)升级casper,ghost默认主题

1
cp -R content/themes/casper /usr/ghost/content/themes/

7. 切换回到ghost安装目录

1
cd /usr/ghost

8. 修改文件目录所有者和所属组为ghost

1
chown -R ghost:ghost ./*

9. 重新安装环境

1
npm install --production

10. 重启Ghost

1
pm2 restart ghost
# Ghost
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×