Ghost is an open source blogging platform and headless CMS. It is the software that runs the Arctype Blog. When developing against Ghost locally, SQLite is the database that is used. This guide covers where to find the SQLite file and how to visualize and write SQL against your Ghost data.
Ghost can be installed locally through the instructions at that link. But the basic commands are these:
npm install ghost-cli@latest -g
The Ghost CLI can then install the needed packages and data. Note that if you do not use the -g
argument you may not get ghost
added to the $PATH variable. Once ghost
is available on your machine you can proceed with the install.
mkdir install
cd install
ghost install local
This will create a directory called install
where your Ghost installation will live.
In the directory where Ghost is installed, in this case the install
directory, the Ghost SQLite database will be located at content/data
. You can get to this file by running the following in the command line.
cd $GHOST_INSTALL_DIRECTORY/content/data
You can open this file in the Arctype SQLite GUI by navigating to that directory in the Connection screen.
If you have a hosted Ghost instance running and you want to import your data into this file, you can do that by following the instructions for exporting and importing Ghost blog data.
Now that your data is setup and loaded, you can write SQL queries against it, view posts and authors, and do more advanced development on your themes and Ghost server.
You may want to host Ghost yourself. In this case we advise that you migrate your Ghost data to another database like MySQL. You can find a guide on this migration here. Once your Ghost database is in MySQL you can use the Arctype MySQL GUI to connect to it as well.