Why does ghost-cli installation has two folders with the same name `current`?

I’ve just ran ghost install local and got the following directory structure with very similar content folders:

content      <==========================
     apps
     data
     images
      ...
current
versions
   2.22.0
       content    <=====================
            data
            images
            ...
       core
       ...

My question is why do we need both? I tried renaming each one but it seems they are all required to run ghost. After I’ve renamed the top level content ghost couldn’t start. After I’ve renamed the folder inside the current ghost version I got 500 saying that the currently active theme "casper" is missing.

Can anyone please clarify?

The top level content folder is where your images and other user-generated content (including the db if you use sqlite) is stored. The version-level content folder is mainly used for developing Ghost, but also contains the latest release of casper. That way, if you’re using the default theme, you’ll always be up-to-date :slight_smile:

1 Like

Cool, thanks! So as I understand the top level content folder is where all my theme customizations should go, correct? I’ve now checked the the content\themes\casper and it’s a symlink pointing to casper inside the Ghost installation in versions.

I’ve also explored sources a little bit, the current theme seems to be defined in core/server/data/schema/default-settings.json. I assume you somehow deploy the new scheme using Ghost-CLI and it updates this value. Am I on the right path here? :slight_smile:

That’s correct! While you can make direct changes to the symlinked casper theme, it’s usually suggested to clone it to another folder. If your active theme is invalid, ghost will fall back to the casper theme

Nope - If you want to add or activate a theme, you do that in the admin interface! Once you get Ghost up and running, you usually shouldn’t need to make any file system changes, unless you’re upgrading ghost :slight_smile:

If you want to add or activate a theme, you do that in the admin interface! Once you get Ghost up and running, you usually shouldn’t need to make any file system changes, unless you’re upgrading ghost

Yep, thanks. Just found it that setting a new theme through admin interface updates the value in the settings database for the key active_theme. It does it inside core/server/api/v2/themes.js when the request to activate a new theme comes through.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.