How to Update Hexo?

Hexo 4.0.0 has been released on 2019-10-14. How to upgrade it?

Upgrade Hexo

  1. Go to the hexo folder
  2. Modify package.json file, inside “dependencies” braces:
1
2
-    "hexo": "^3.9.0",
+    "hexo": "^4.0.0",

UNNECESSARY to change

1
2
3
"hexo": {
    "version": "3.9.0"
},

and it will be automatically updated after “npm update”.

  1. Run
1
$ npm update

Done. Then check the hexo version as below.

Check Hexo Version

Go to the hexo folder and run:

1
2
3
$ hexo --version
hexo: 4.0.0
hexo-cli: 1.1.0