# Custom directory structure / Changing location of the Panel dir

**URL:** <https://forum.getkirby.com/t/custom-directory-structure-changing-location-of-the-panel-dir/7638>\
**Category:** Questions\
**Tags:** v2\
**Created:** [June 1, 2017, 5:56pm UTC](https://forum.getkirby.com/t/custom-directory-structure-changing-location-of-the-panel-dir/7638 "2017-06-01T17:56:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![twirx](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@twirx](https://forum.getkirby.com/u/twirx)\
**Post date:** [June 1, 2017, 5:56pm UTC](https://forum.getkirby.com/t/custom-directory-structure-changing-location-of-the-panel-dir/7638/1 "2017-06-01T17:56:08Z")

</div>

Hi everybody,

I’ve been trying to set up a directory structure like this for a current project:

```auto
 +–– web/
     |
     +—— app
     | +—— assets/
     | +—— kirby/
     | +—— panel/
     | +—— …
     |
     +—— data/
     | +—— accounts/
     | +—— avatars/
     | +—— content/
     | +—— thumbs/
     | +—— …
     +—— index.php

```

I’ve set up almost all paths correctly and everything seems to be working alright, except the panel. It seems that the location of the panel folder is somehow hardcoded, so I was able to fix this removing the `app` directory from the path in the Panel’s `launch()`-method . However, I’d rather like to solve this in a more elegant way.

[`panel/app/src/panel.php`:](https://github.com/getkirby/panel/blob/master/app/src/panel.php#L387)

```auto
–387 $this->path = $this->kirby->path();
+387 $this->path = explode('/', $this->kirby->path);
+388 unset($this->path[0]);
+389 $this->path = implode('/', $this->path);

```

Did anybody else try to accomplish something similar? Or is this simply not possible right now? If so, are there any severe reasons not to implement this (obviously in a cleaner and a more generally applicable way)?

Thanks in advance for your help! 🙂

Edit: I tried solving this by adding custom rewrite settings, however Kirby depends on the actual directory structure. (Or I’ve been doing something wrong… ;))

---

<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:** [June 6, 2017, 6:30am UTC](https://forum.getkirby.com/t/custom-directory-structure-changing-location-of-the-panel-dir/7638/2 "2017-06-06T06:30:32Z")

</div>

As far as I can see, you can customize all [roots](https://getkirby.com/docs/cheatsheet#roots), probably not the Panel.

---

<div class="post-metadata">

**Author:** ![twirx](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@twirx](https://forum.getkirby.com/u/twirx)\
**Post date:** [June 6, 2017, 4:28pm UTC](https://forum.getkirby.com/t/custom-directory-structure-changing-location-of-the-panel-dir/7638/3 "2017-06-06T16:28:14Z")

</div>

Thanks for your reply, @texnixe! Yep, I know that section in the docs…

Do you know if there’s any reason why the path to the Panel directory is currently not customizable? If not, I’d create an issue on GitHub so that this can be considered for future releases.

---

<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:** [June 6, 2017, 5:10pm UTC](https://forum.getkirby.com/t/custom-directory-structure-changing-location-of-the-panel-dir/7638/4 "2017-06-06T17:10:16Z")

</div>

No, I don’t know why this is the case. If you create a feature request issue on GitHub, maybe we will learn more or will have that feature in the future.

---

<div class="post-metadata">

**Author:** ![twirx](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@twirx](https://forum.getkirby.com/u/twirx)\
**Post date:** [June 6, 2017, 6:25pm UTC](https://forum.getkirby.com/t/custom-directory-structure-changing-location-of-the-panel-dir/7638/5 "2017-06-06T18:25:13Z")

</div>

I have created an [issue on GitHub](https://github.com/getkirby/panel/issues/1053) and will update this post if there are any news 🙂

---

<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:49pm UTC](https://forum.getkirby.com/t/custom-directory-structure-changing-location-of-the-panel-dir/7638/6 "2025-02-06T16:49:47Z")

</div>

Archived on February 6, 2025, 4:49pm UTC


