1 minute read

I have recently been trying ghost as an alternative to Wordpress. Although I still run a fair few wordpress sites and can’t see it replacing times where you need a CMS for a while if you just want a place to collect your thoughts Ghost is perfect.

Although I don’t having anything against storing Ghost’s tables in a SQLite3 database I have used mysql for many years and can easily include my Ghost in my backup scripts.

Getting started with a configuration is easy. Simply Edit the config.js file and adjust the following in the production stanza:

client: 'sqlite3', connection: { filename: path.join(__dirname, '/content/data/ghost.db') },

To the following:

client: 'mysql', connection: { host : '', user : 'username_here', password : 'password_here', database : 'database_name_here', charset : 'utf8'

Migrating from one database format to another

If you have already started your site in another database it is easy to migrate. Simply use the export feature in the labs page found in settings. This will export nearly everything out of your database. Change over to MySQL and run through the initial setup process again. Then under the labs page again in settings:

  • Press Delete all content
  • Import the file you exported earlier

Your content will then be restored.

Leave a comment