diff --git a/lib/generate.js b/lib/generate.js
index <HASH>..<HASH> 100644
--- a/lib/generate.js
+++ b/lib/generate.js
@@ -195,6 +195,9 @@ module.exports = function(options, callback){
         process(files, next);
       });
     },
+    save: ['theme_source', 'process', function(next){
+      file.write(baseDir + 'db.json', JSON.stringify(hexo.db.export()), next);
+    }],
     generate: ['theme_config', 'theme_layout', 'theme_i18n', 'process', function(next, results){
       var themeConfig = freeze(results.theme_config),
         themei18n = results.theme_i18n;
Generate: export database after process done