How to update hexo

I have never update my hexo since installed. Now it is time to update hexo and its packages. I heard that the performance is better in the latest hexo. I have occurred out of memory when deploying blog using old version of hexo. I hope this could be solved by updating hexo.

Log into your server as user who owns the hexo blog repo and switch to this directory.

1
2
3
4
5
6
7
8
9
hexo -v # check current version of hexo.
npm install -g npm-check
npm-check
npm install -g npm-upgrade
npm-upgrade
npm update -g
npm install -g npm
npm install hexo@7.3.0 --save # change the version number as the latest one, which could be found in output before.
hexo -v # check if updation successed.

Reference

  1. https://blog.csdn.net/sihai12345/article/details/119122246
  2. https://leimingshan.com/posts/d9017f30/