Let's say how to migrate from SQLite to MySQL.
Get ready
First, you have to install the MySQL database. If you are using an Ubuntu system, please refer to this article. Other systems please refer to their respective documentation.
Export Current Data
Enter Http://your-domain.com/ghost/debug page:
Click on the blue button to export all the data in the current database and download it locally, the default filename is Ghostdata.json.
Switch Database configuration
Edit the Config.js file and modify the database configuration to MySQL in the Production configuration section:
JavaScript database: {
client: ' MySQL ', connection: {host: ' localhost ',///Database Server User: ' Database login ', password: ' Database login password ', DB: ' Database name ', CharSet: ' UTF8 '}, debug:false},
After completing the above fields, restart Ghost.
Import data
Because of the replacement of the database, there is no content in the new MySQL database, there is no login account, then we need to create a new temporary account, and then log into the Http://your-domain.com/ghost/debug Pages, such as the above, re-import the data that you exported earlier.
Reopen your Site page again, whether the original data are back!