CAUTION: this is for single-user only
Official announcement: MySQL 8 will be the required database in the next major release of Ghost.
I’m kinda lazy, and there are not too many viewers on my site, so I'm just using the default SQLite3 database. Now it’s time to take action.
The steps of database migration (on the same server) are as follows:
1. Export Ghost content JSON file
Ghost Admin Panel -> Settings -> Labs -> Export you content.
2. Stop the container
3. Remove any existing database local volume
4. Modify YML file
… environment: database__client: mysql … … db: image: mysql:8.0 …
5. Up the container
docker-compose up -d
6. Config your Ghost site
Go to YourGhostSite.com/ghost, create the same Username/Password as your previous Ghost site.
Go to Settings -> Lab -> Import content -> Upload the JSON file you just downloaded -> Import
(Optional) 7. Tips
Always keep a copy of your
content folder and regularly export JSON file as a backup.