Linux

Where Does Grav CMS Store Content?

Grav CMS keeps pages, accounts, and config under the user folder. Back up user plus logs for safety.

Last updated

Grav is flat file. The user folder holds pages, accounts, plugins config, themes, and data. The system folder holds core code you can reinstall. For backup purposes, user is the part that matters.

Logs and cache sit under logs and cache and can be rebuilt. Back up user/accounts, user/pages, user/config, and user/data. Those four cover content, logins, and site settings. Clear the cache folder after restore, then log into the admin panel to confirm pages and accounts load. Test a login after restore, since account files must stay readable by the web user.

Where Grav CMS stores this, by platform

Linux
/var/www/html/grav/user

All site content and settings. Copy this whole folder for migration. Keep the same Grav version on source and target.

Linux
/var/www/html/grav/system/config/system.yaml

Per environment settings and plugin defaults. Back up system/config only if you edited core files, which is uncommon.

Frequently asked questions

how do i migrate a grav site

Copy the user folder into a fresh Grav install of the same version. Clear cache/bin/grav clear-cache after copying. Check file ownership if the admin panel cannot write.

can i back up grav with git

Pages live as .md files under user/pages, so plain file backup works. The admin plugin adds user/accounts and user/data. Version both with git or plain copies.

Notice an outdated path? Let us know.