Answers.Body: <p>This looks overall good!  A few suggestions though:</p>
  
  <ul>
  <li>I would advise moving Civi 4.3.8 into the sites/all/modules folder separately from the upgrade.  Since this is a fairly unique setup, it would be good to eliminate it so that if something goes wrong, you know this isn't the issue.  You should be able to do that just by enabling maintenance mode, removing the symlink, and moving the CiviCRM folder to where the symlink was.  Make sure there are no references to the incorrect location in <code>civicrm.settings.php</code> or in <strong>Administer menu » System Settings » Directories</strong> or <strong>Administer menu » System Settings » Resource URLs</strong>.</li>
  <li>I'm not sure what <code>settings_location.php</code> is, that's probably specific to your setup</li>
  <li>Depending on how abused your database is, you may encounter upgrade errors going from 4.3 to 4.7.  If so, don't forget when rolling back to drop your CiviCRM database and create a new blank database before restoring!  A restore will not delete newly-created tables, and CiviCRM upgrades choke when they try to create a table that already exists.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-20T23:11:15.227Z
Answers.Text: I also needed to move my backups folder and my original CiviCRM folder out of var/www/html or else I would get the following error: `Fatal error: Cannot redeclare class CRM_Core_DAO in /var/www/html/example/docroot/sites/all/modules/civicrm/CRM/Core/DAO.php on line 0`
Answers.UserDisplayName: Christia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-12-20T06:12:55.583Z
Answers.LastActivityDate: 2016-12-20T06:12:55.583Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I am finally upgrading the CiviCRM on a website I didn't develop. It is running on Drupal 7.50, (upgraded from 7.37), and is currently version 4.3.8. Planning to upgrade to 4.7.13.</p>
  <p>Here's the thing: it was set up outside of the Drupal docroot, using symlinks and some other setting changes. It works, but it's more complex than the usual setup. Due to the already heavy nature of our Drupal site, it is my understanding that this setup would help with performance issues. I want to both upgrade it and move it into the Drupal sites/all/modules directory.</p>
  <p>Aside from the usual steps to perform the upgrade up so many versions, I wanted to see if anyone could anticipate any upgrade problems I might have and evaluate my plan outlined below to complete the upgrade, due to this unique situation? Let me know if this is out of the scope of this forum, and I'll remove it, though it might be helpful if someone else finds themselves in the same boat. I am going to try these steps out on a dev copy before attempting it on production.</p>
  <p><strong>The Setup:</strong></p>
  <p>CiviCRM root is in /var/www/html along with our Drupal Docroot, and all components are as such:</p>
  <ul>
  <li><p>CiviCRM Home: <code>/var/www/html/civicrm/v.4.3.8-d7</code></p>
  </li>
  <li><p>Drupal Home: <code>/var/www/html/drupal/docroot</code></p>
  </li>
  <li><p>CiviCRM Settings: <code>&lt;drupal home&gt;/sites/default/civicrm.settings.php</code></p>
  </li>
  <li><p>CiviCRM Files: <code>&lt;drupal home&gt;/sites/default/files/civicrm</code></p>
  </li>
  <li><p>Symlink to Codebase: <code>&lt;drupal home&gt;/sites/all/modules/civicrm -&gt; &lt;civicrm root&gt;/v.4.3.8-d7</code></p>
  </li>
  <li><p>Settings_Location.php:  <code>&lt;civicrm home&gt;/v.4.3.8-d7/settings_location.php</code></p>
  <pre><code>   define( 'CIVICRM_CONFDIR', '/var/www/html/drupal/docroot/sites' );
  </code></pre>
  </li>
  </ul>
  <p><strong>The Plan:</strong></p>
  <ul>
  <li><p>Back up the Drupal and CiviCRM codebase and database into '/var/www/html/backups'</p>
  </li>
  <li><p>Login to Drupal site and put website into maintenance mode; stay
  logged in</p>
  </li>
  <li><p>Disable Drupal CiviCRM integration modules</p>
  </li>
  <li><p>*Delete symlink in <code>&lt;drupal home&gt;/sites/all/modules</code></p>
  </li>
  <li><p>Make the <code>&lt;drupal home&gt;/sites/default</code> directory writeable to the
  server</p>
  </li>
  <li><p>Download and unpack v4.7.13 to <code>&lt;drupal home&gt;/sites/all/modules</code></p>
  </li>
  <li><p>Backup and move civicrm.settings.php file</p>
  </li>
  <li><p>Clear browser cache and all files in <code>&lt;drupal home&gt;/sites/default/files/civicrm/templates_c/</code></p>
  </li>
  <li><p>Run the install: <code>http://&lt;drupal home&gt;/civicrm/upgrade?reset=1</code> (for
  clean URLS)</p>
  </li>
  <li><p>Update the CiviCRM Resource URL</p>
  </li>
  <li><p>Re-enable Drupal CiviCRM integration modules</p>
  </li>
  <li><p>Check Drupal role settings</p>
  </li>
  <li><p>Pull the site out of maintenance mode</p>
  </li>
  </ul>
  <p>*extra or modified steps I added to the usual ones listed in the upgrade guide:</p>
  <p><strong>Resources</strong>
  <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+for+Drupal+7" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+for+Drupal+7</a></p>
  
Tags: <drupal><upgrade><4.3>
Title: Upgrading CiviCRM that is set up outside of the Drupal docroot with symlinks
ThreadText: # Upgrading CiviCRM that is set up outside of the Drupal docroot with symlinks
  
  (Asked by: username_0 on 2016-12-20)
  
  I am finally upgrading the CiviCRM on a website I didn't develop. It is running on Drupal 7.50, (upgraded from 7.37), and is currently version 4.3.8. Planning to upgrade to 4.7.13.
  
  Here's the thing: it was set up outside of the Drupal docroot, using symlinks and some other setting changes. It works, but it's more complex than the usual setup. Due to the already heavy nature of our Drupal site, it is my understanding that this setup would help with performance issues. I want to both upgrade it and move it into the Drupal sites/all/modules directory.
  
  Aside from the usual steps to perform the upgrade up so many versions, I wanted to see if anyone could anticipate any upgrade problems I might have and evaluate my plan outlined below to complete the upgrade, due to this unique situation? Let me know if this is out of the scope of this forum, and I'll remove it, though it might be helpful if someone else finds themselves in the same boat. I am going to try these steps out on a dev copy before attempting it on production.
  
  **The Setup:**
  
  CiviCRM root is in /var/www/html along with our Drupal Docroot, and all components are as such:
  
  * CiviCRM Home: `/var/www/html/civicrm/v.4.3.8-d7`
  * Drupal Home: `/var/www/html/drupal/docroot`
  * CiviCRM Settings: `<drupal home>/sites/default/civicrm.settings.php`
  * CiviCRM Files: `<drupal home>/sites/default/files/civicrm`
  * Symlink to Codebase: `<drupal home>/sites/all/modules/civicrm -> <civicrm root>/v.4.3.8-d7`
  * Settings\_Location.php: `<civicrm home>/v.4.3.8-d7/settings_location.php`
  
    ```
       define( 'CIVICRM_CONFDIR', '/var/www/html/drupal/docroot/sites' );
  
    ```
  
  **The Plan:**
  
  * Back up the Drupal and CiviCRM codebase and database into '/var/www/html/backups'
  * Login to Drupal site and put website into maintenance mode; stay
    logged in
  * Disable Drupal CiviCRM integration modules
  * \*Delete symlink in `<drupal home>/sites/all/modules`
  * Make the `<drupal home>/sites/default` directory writeable to the
    server
  * Download and unpack v4.7.13 to `<drupal home>/sites/all/modules`
  * Backup and move civicrm.settings.php file
  * Clear browser cache and all files in `<drupal home>/sites/default/files/civicrm/templates_c/`
  * Run the install: `http://<drupal home>/civicrm/upgrade?reset=1` (for
    clean URLS)
  * Update the CiviCRM Resource URL
  * Re-enable Drupal CiviCRM integration modules
  * Check Drupal role settings
  * Pull the site out of maintenance mode
  
  \*extra or modified steps I added to the usual ones listed in the upgrade guide:
  
  **Resources**
  <https://wiki.civicrm.org/confluence/display/CRMDOC/Upgrading+CiviCRM+for+Drupal+7>
  
  **Tags:** drupal, upgrade, 4.3
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-12-20. Score: 1 | Accepted answer
  
  This looks overall good! A few suggestions though:
  
  * I would advise moving Civi 4.3.8 into the sites/all/modules folder separately from the upgrade. Since this is a fairly unique setup, it would be good to eliminate it so that if something goes wrong, you know this isn't the issue. You should be able to do that just by enabling maintenance mode, removing the symlink, and moving the CiviCRM folder to where the symlink was. Make sure there are no references to the incorrect location in `civicrm.settings.php` or in **Administer menu » System Settings » Directories** or **Administer menu » System Settings » Resource URLs**.
  * I'm not sure what `settings_location.php` is, that's probably specific to your setup
  * Depending on how abused your database is, you may encounter upgrade errors going from 4.3 to 4.7. If so, don't forget when rolling back to drop your CiviCRM database and create a new blank database before restoring! A restore will not delete newly-created tables, and CiviCRM upgrades choke when they try to create a table that already exists.
  
  > **Comments:**
  > **username_0**: I also needed to move my backups folder and my original CiviCRM folder out of var/www/html or else I would get the following error: `Fatal error: Cannot redeclare class CRM_Core_DAO in /var/www/html/example/docroot/sites/all/modules/civicrm/CRM/Core/DAO.php on line 0`  
  
  ---
  
  