# Alternative folder setup

**URL:** <https://forum.getkirby.com/t/alternative-folder-setup/5677>\
**Category:** Solutions\
**Tags:** v2\
**Created:** [November 4, 2016, 10:55am UTC](https://forum.getkirby.com/t/alternative-folder-setup/5677 "2016-11-04T10:55:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jenstornell](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jenstornell/32/546_2.png) [@jenstornell](https://forum.getkirby.com/u/jenstornell)\
**Post date:** [November 4, 2016, 10:55am UTC](https://forum.getkirby.com/t/alternative-folder-setup/5677/1 "2016-11-04T10:55:15Z")

</div>

Now it’s possible to configure more folder paths than before.

[https://getkirby.com/docs/developer-guide/configuration/folders](https://getkirby.com/docs/developer-guide/configuration/folders)

My first test went perfect.

## My current folder setup

**Root**

```plaintext
cache
kirby
panel
plugins
site
user

```

**Nested**

```plaintext
cache
  content
  thumbs
kirby
panel
plugins
site
  assets
  blueprints
  config
  controllers
  snippets
  templates
user
  accounts
  content

```

## Cache

For me both these are cache data so I put them into a cache folder.

```plaintext
cache/content
cache/thumbs

```

## Kirby + Panel

I don’t like to have them as two folders in the root. I would like them to be inside a `core` folder but that failed.

## Plugins

I often work with plugin and for me it takes alot of clicks to get into the right plugin. Now it’s in the root. It also makes sense to have it as an own section because it’s often general stuff.

## Assets

I moved `assets` from the root to `site`. I think it belongs better here.

```plaintext
site/assets

```

Be aware, if you want to do this as well you need to change the htaccess file in a less secure way:

```plaintext
# RewriteRule ^site/(.*) index.php [L]

```

The hash disables this line. It allows the `assets` to be in the `site` folder. If you have a better way to allow only `assets` in the `site` folder, be my guest. 🙂

## User

Everything that the user does in the panel is in the `user` folder.

```plaintext
user/accounts
user/content

```

## Code

```php
$kirby = kirby();

# User / Accounts
$kirby->roots->accounts = $kirby->roots()->index() . DS . 'user' . DS . 'accounts';

# User / Content
$kirby->roots->content = $kirby->roots()->index() . DS . 'user' . DS . 'content';
$kirby->urls->content = $kirby->urls()->index() . '/user/content';

# Cache / Content
$kirby->roots->cache = $kirby->roots()->index() . DS . 'cache' . DS . 'content';

# Cache / Thumbs
$kirby->roots->thumbs = $kirby->roots()->index() . DS . 'cache' . DS . 'thumbs';
$kirby->urls->thumbs = $kirby->urls()->index() . '/cache/thumbs';

# Plugins
$kirby->roots->plugins = $kirby->roots()->index() . DS . 'plugins';

# Assets
$kirby->roots->assets = $kirby->roots()->index() . DS . 'site' . DS . 'assets';
$kirby->urls->assets = $kirby->urls()->index() . '/site/assets';

```

If you have any feedback or can help with my unsolved issues, write…

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [November 4, 2016, 3:24pm UTC](https://forum.getkirby.com/t/alternative-folder-setup/5677/2 "2016-11-04T15:24:43Z")

</div>

I actually put content, accounts and avatars together into one project-content folder, but prefer to have the assets in their own folder.

---

<div class="post-metadata">

**Author:** ![jenstornell](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jenstornell/32/546_2.png) [@jenstornell](https://forum.getkirby.com/u/jenstornell)\
**Post date:** [November 4, 2016, 3:27pm UTC](https://forum.getkirby.com/t/alternative-folder-setup/5677/3 "2016-11-04T15:27:59Z")

</div>

I’ve never used avatars. But I had in mind to place `avatars` in `users`, together with `content` and `accounts`. 🙂

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 4:54pm UTC](https://forum.getkirby.com/t/alternative-folder-setup/5677/4 "2025-02-06T16:54:53Z")

</div>


