---
title: Folder Structure
taxonomy:
    category: docs
---

Because Grav is a **flat-file based CMS**, meaning there is no database that underpins it, the folder structure of your site is very important.  At the **top level** of your Grav installation the folder structure looks like:

```bash
/assets
/bin
/cache
/images
/logs
/system
/user
/vendor
```

So let us dig a little deeper into each of these top level folders and explain what they are for:

### /assets

**(v0.9.0+)** The `assets` folder is used by the new asset management system within Grav to store processed `.css` and `.js` files.

>>> This folder should not be used to store any user data because it is routinely flushed.

### /bin

The `bin` folder contains the [Grav CLI application][grav-cli] that can be used to perform some handy tasks from the command line.  This is a relatively advanced feature primarily intended for developers, so will set-aside this topic for later discussion.

### /cache

The `cache` folder is used to store temporary cached files that are automatically generated by Grav to improve performance.  By default, caching in Grav is handled automatically, and the best available option is selected.

If Grav decides that the **filesystem** is the best caching method, the cached files it generates will be stored here.  Also the Twig template engine uses this location to store its pre-compiled template files.  Again, this is done to ensure that Grav performs at its optimum speed.

>>> This folder should not be used to store any user data, as it routinely flushed of all data.

### /images

Grav comes built-in with a powerful yet very [easy-to-use image manipulation library][library].  This means you can easily resize an image on-the-fly from your content or even from a plugin.  These images are stored in the `images` folder so that they can be reused if the same image with the same size is requested again.

It acts like an image cache folder.  This is intended for automatically generated files, user provided media should be stored in the `user/pages/`, `user/themes/` or even a custom `user/images/` folder.

>>> This folder should not be used to store any user data, as it routinely flushed of all data.

### /logs

When there is an error, or if you have extra logging or profiling turned on, then Grav stores these in the `logs` folder.

### /system

The `system` folder is where the files that make Grav function actually live.  You should not edit anything in this folder because an update of Grav could overwrite your changes.  If you need to change something related to how Grav works, you can use plugins as discussed in later chapters.

### /vendor

The `vendor` folder contains important libraries that Grav relies on.  This folder is similar to the `system` folder in that it should not be tampered with unless you really know what you are doing.

**(v0.9.2+)**  If you [installed][installation] Grav from GitHub, the `vendor` folder won't be included with it. You will have to run `bin/grav install` or `composer install` from the root of your Grav instance in order to get the vendors installed. More details can be found under the [installation][installation] section.

### /user

This is the most important folder for the majority of people. This is where you will spend your time creating content, using plugins, and editing your themes. Let us burrow a little further into this folder:

```bash
/user/accounts
/user/config
/user/data
/user/pages
/user/plugins
/user/themes
```

### /user/accounts

The `accounts` folder is where you will define any user accounts you may need if you wish to restrict access to portions of your site.

>>>>> This is currently a placeholder folder until this functionality is fully developed.

### /user/config

The [configuration files][config] are used to configure the web site and have been discussed in the previous chapter.

### /user/data

The `data` folder can be used by plugins to store data that you can reference later.  A good example of a plugin that utilizes this folder is the **Forms** plugin that can take a web form and store the submitted data in a text file in this folder.  You can store other things such as user-uploads or anything you wish to really.

>>> This folder is not accessible via a browser by default.

### /user/pages

This is the heart of Grav. the `pages` folder is where you create and edit your content.  We will go in to much more depth in the [next section][next].

### /user/themes

A theme turns your content into a true website.  It converts the content you have constructed into the HTML that a browser understands and can represent visually to your audience.  There is a base theme that is provided with Grav, and you can also download others from the [GetGrav.org][website] web site, or even create your own.  The [Themes][themes] section will outline this in detail.

[library]: ../content/media
[config]: grav-configuration
[next]: ../content
[website]: http://getgrav.org
[themes]: ../themes
[grav-cli]: ../advanced/grav-cli
[installation]: ../installation
