Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-06T08:53:43.360Z
Answers.LastActivityDate: 2019-02-06T08:53:43.360Z
Answers.UserDisplayName: Romain P.
Body: <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>
  
Tags: <control-panel><cache><cli><resources>
Title: How to I set the location folder of Control Panel resources?
ThreadText: # 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'`
  
  
  ---
  
  