Answers.Body: <p>You can specifically set the value of <code>[civicrm.files]</code> in <code>civicrm.settings.php</code> with code like this: </p>
  
  <pre><code>global $civicrm_paths;
  $civicrm_paths['civicrm.files'] = array(
    'url' =&gt; 'https://example.com/foo',
    'path' =&gt; '/var/www/example.com/foo',
  );
  </code></pre>
  
  <p>If you don't set the value, then Civi will try to find it automatically, but this doesn't work in all configurations. (For example, if your directory structure uses symlinks, it may not resolve correctly.)</p>
  
  <p><strong>Tip</strong>: You didn't ask, but if your system is basically working, then you can inspect the value of <code>[civicrm.files]</code> in a few ways:</p>
  
  <ul>
  <li>In the web UI, navigate to <code>Administer =&gt; System Settings =&gt; Directories</code>. Click on the main help icon.</li>
  <li>In the web UI, navigate to <code>Administer =&gt; System Settings =&gt; Resource URLs</code>. Click on the main help icon.</li>
  <li>In the CLI, run <a href="https://github.com/civicrm/cv" rel="noreferrer"><code>cv path -d [civicrm.files]</code></a> </li>
  <li>In the CLI, run <a href="https://github.com/civicrm/cv" rel="noreferrer"><code>cv url -d [civicrm.files]</code></a> </li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-13T18:52:08.520Z
Answers.Text: Thanks for this Tim!  CiviCRM on the System Status page suggests to me that I should make my resource URLs portable but the documentation says it should be absolute.
  
  Does it matter?
Answers.UserDisplayName: themak
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-13T20:29:13.247Z
Answers.Text: Tim, thanks for the great answer.  I guess the plot thickens when CV reports I have the right paths.
Answers.UserDisplayName: Josh
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-14T03:58:59.867Z
Answers.Text: If you can use variables like `[civicrm.files]`, I'd say do that. I'm not sure which doc recommends abslute, but I'd guess it was written before 4.7.0. TBH, it's as much taste/circumstance as anything.
Answers.UserDisplayName: Tim Otten
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-14T18:56:51.237Z
Answers.Text: @TimOtten https://wiki.civicrm.org/confluence/display/CRMDOC/Resource+URLs
Answers.UserDisplayName: themak
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-15T01:12:41.073Z
Answers.Text: I found that even though the paths were correct according to the CV command I still had to use the code above.  Also, I found that CiviCRM was adding /ext and my path was /extend.
Answers.UserDisplayName: Josh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-19T01:53:44.207Z
Answers.Text: Thanks Tim, still useful even after all these years!
Answers.UserDisplayName: cividesk
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-13T17:34:22.577Z
Answers.LastActivityDate: 2017-07-14T03:49:02.587Z
Answers.LastEditDate: 2017-07-14T03:49:02.587Z
Answers.UserDisplayName: Tim Otten
Body: <p>I have a dev copy of CiviCRM that I upgraded to 4.7.21.  The file paths have been removed and show [civicrm.files] instead.  I cannot figure out how to set [civicrm.files] so that CiviCRM can see the <em>extend</em> directory and other files. </p>
  
  <p>Thanks!</p>
  
Tags: <civicrm.settings.php>
Title: Set [civicrm.files]
ThreadText: # Set [civicrm.files]
  
  (Asked by: username_0 on 2017-07-13)
  
  I have a dev copy of CiviCRM that I upgraded to 4.7.21. The file paths have been removed and show [civicrm.files] instead. I cannot figure out how to set [civicrm.files] so that CiviCRM can see the *extend* directory and other files.
  
  Thanks!
  
  **Tags:** civicrm.settings.php
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-07-13. Score: 12 | Accepted answer
  
  You can specifically set the value of [civicrm.files] in civicrm.settings.php with code like this: 
  global $civicrm_paths;
  $civicrm_paths['civicrm.files'] = array(
    'url' => 'https://example.com/foo',
    'path' => '/var/www/example.com/foo',
  );
  
  If you don't set the value, then Civi will try to find it automatically, but this doesn't work in all configurations. (For example, if your directory structure uses symlinks, it may not resolve correctly.)
  Tip: You didn't ask, but if your system is basically working, then you can inspect the value of [civicrm.files] in a few ways:
  
  In the web UI, navigate to Administer => System Settings => Directories. Click on the main help icon.
  In the web UI, navigate to Administer => System Settings => Resource URLs. Click on the main help icon.
  In the CLI, run cv path -d [civicrm.files] 
  In the CLI, run cv url -d [civicrm.files]
  
  > **Comments:**
  > **username_2**: Thanks for this Tim!  CiviCRM on the System Status page suggests to me that I should make my resource URLs portable but the documentation says it should be absolute.  Does it matter?  
  > **username_0**: Tim, thanks for the great answer.  I guess the plot thickens when CV reports I have the right paths.  
  > **username_1**: If you can use variables like `[civicrm.files]`, I'd say do that. I'm not sure which doc recommends abslute, but I'd guess it was written before 4.7.0. TBH, it's as much taste/circumstance as anything.  
  > **username_2**: @TimOtten https://wiki.civicrm.org/confluence/display/CRMDOC/Resource+URLs  
  > **username_0**: I found that even though the paths were correct according to the CV command I still had to use the code above.  Also, I found that CiviCRM was adding /ext and my path was /extend.  
  > **username_3**: Thanks Tim, still useful even after all these years!  
  
  ---
  
  