Change Ghost Theme From Command Line


If you need to change your Ghost theme selection and you do not have access to the Ghost settings through the web interface, you can make the change directly in the database.

To view your active Ghost theme from the command line first connect to the database:

cd /var/www/ghost/content/data
sqlite3 ghost.db

Now query the settings table for your activeTheme:

select * from settings where key = 'activeTheme';

This will return something like the following:

activeTheme|PurpleSlimer

where activeTheme is the key from the settings table and PurpleSlimer is the value of your current active theme.

Now, to update your active theme, run the following query replacing casper with the name of your themes directory that you are switching to:

Copy the name of your themes directory exacly. Take a look at the following screenshot for some examples.

alt

update settings set value='casper' where key = 'activeTheme';

Run your select again and confirm that the activeTheme value is your new desired theme:

sqlite> select key, value from settings where key = 'activeTheme';

activeTheme|casper

Now, restart Ghost, and Ghost will use your newly select theme!