Answers.Body: <p>You can use $civicrm_setting variable to over-ride your CiviCRM settings. You can find documentation <a href="https://docs.civicrm.org/sysadmin/en/latest/customize/settings/" rel="nofollow noreferrer">here</a>.</p>
  
  <p>To set extension directory you can use below snippet</p>
  
  <pre><code>global $civicrm_setting;
  $civicrm_setting['Directory Preferences']['extensionsDir'] = '/var/www/html/trcbtp/drupal/sites/default/civicrm_extensions';
  </code></pre>
  
  <p>You can also use civicrm token variable for dynamic path</p>
  
  <pre><code>1. [cms.root]
  2. [civicrm.root]
  3. [civicrm.files]
  </code></pre>
  
  <p>HTH</p>
  
  <p>Pradeep</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-08T14:26:33.470Z
Answers.Text: Can I run that command on the command line of my web server? Thanks
Answers.UserDisplayName: santiagoelie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-08T14:40:24.757Z
Answers.Text: What command? Do you mean the command to append the line in civicrm.settings.php?
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-08T15:09:05.307Z
Answers.Text: Yup Pradeep. Sorry coz I am new to this one. That's why. Thanks.
Answers.UserDisplayName: santiagoelie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-08T15:16:08.003Z
Answers.Text: Yes, You can use commands to append the line.
Answers.UserDisplayName: Pradeep Nayak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-09T07:38:59.713Z
Answers.Text: Hi Pradeep, do you know a a sample of video tutorial for this one? So that I can see the step-by-step procedure? Thanks so much!
Answers.UserDisplayName: santiagoelie
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-08T14:17:48.413Z
Answers.LastActivityDate: 2018-10-08T14:17:48.413Z
Answers.UserDisplayName: Pradeep Nayak
Body: <p>How can I modify the CiviCRM settings file so that the CiviCRM extension directory is set using settings files variables. Thanks!</p>
  
Tags: <settings><files>
Title: How to Modify CiviCRM settings file
ThreadText: # How to Modify CiviCRM settings file
  
  (Asked by: username_0 on 2018-10-08)
  
  How can I modify the CiviCRM settings file so that the CiviCRM extension directory is set using settings files variables. Thanks!
  
  **Tags:** settings, files
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-10-08. Score: 0 | Accepted answer
  
  You can use $civicrm\_setting variable to over-ride your CiviCRM settings. You can find documentation [here](https://docs.civicrm.org/sysadmin/en/latest/customize/settings/).
  
  To set extension directory you can use below snippet
  
  ```
  global $civicrm_setting;
  $civicrm_setting['Directory Preferences']['extensionsDir'] = '/var/www/html/trcbtp/drupal/sites/default/civicrm_extensions';
  
  ```
  
  You can also use civicrm token variable for dynamic path
  
  ```
  1. [cms.root]
  2. [civicrm.root]
  3. [civicrm.files]
  
  ```
  
  HTH
  
  username_1
  
  > **Comments:**
  > **username_0**: Can I run that command on the command line of my web server? Thanks  
  > **username_1**: What command? Do you mean the command to append the line in civicrm.settings.php?  
  > **username_0**: Yup username_1. Sorry coz I am new to this one. That's why. Thanks.  
  > **username_1**: Yes, You can use commands to append the line.  
  > **username_0**: Hi username_1, do you know a a sample of video tutorial for this one? So that I can see the step-by-step procedure? Thanks so much!  
  
  ---
  
  