<p>Thank you <strong>@Brandon Kelly</strong> for the solution:</p>

<blockquote>
  <p>That’s because <code>@webroot</code> is only reliable on web requests. To fix,
  update your <code>resourceBasePath</code> config setting to a real path:</p>
  
  <p><code>'resourceBasePath' =&gt; dirname(__DIR__) . '/web/cpresources'</code></p>
</blockquote>

CC BY-SA 4.0
2019-02-06T08:53:43.360Z
2019-02-06T08:53:43.360Z
Romain P.
<p>I'm trying to use the <code>./craft clear-caches/all</code> CLI command.</p>

<p>Everything is working fine, except that I always get this error:</p>

<blockquote>
  <p>Error clearing cache Control Panel resources: Unable to clear Control
  Panel resources because the location isn't known for console commands.</p>
</blockquote>

<p>How can I set this resources folder?</p>

<control-panel><cache><cli><resources>
How to I set the location folder of Control Panel resources?
# How to I set the location folder of Control Panel resources?

(Asked by: username_0 on 2019-02-05)

I'm trying to use the `./craft clear-caches/all` CLI command.

Everything is working fine, except that I always get this error:

> Error clearing cache Control Panel resources: Unable to clear Control
> Panel resources because the location isn't known for console commands.

How can I set this resources folder?

**Tags:** control-panel, cache, cli, resources

---

## 1 answers

### Answer by username_0 on 2019-02-06. Score: 2 | Accepted answer

Thank you **@Brandon Kelly** for the solution:

> That’s because `@webroot` is only reliable on web requests. To fix,
> update your `resourceBasePath` config setting to a real path:
>
> `'resourceBasePath' => dirname(__DIR__) . '/web/cpresources'`


---

