Upgrading COD
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
Important
We strongly recommend that you test this upgrade procedure on a clone or copy of your COD website in a test server environment before you upgrade your production server.
Note
At this time, you cannot directly upgrade COD 6.x 1.x or 7.x-1.x-Alpha websites to COD 1.x-Beta or newer.
To upgrade your server's COD installation from one 7.x-1.x version to another 7.x-1.x version of COD, you need to prepare for the upgrade, install the new version of COD, and then inspect your server after the upgrade.
Preparing for the upgrade
- Download the COD recommended release from the COD Project page.
- Back up your website's code (everything in the Drupal root directory) and database.
- Open a web browser, and then sign in to your website as the main administrator account.
- Place your website in "Off-line" mode. This allows the upgrade process to update databases without interruption and to prevent site visitors from seeing error messages. To change the mode:
- In the admin menu, click Configuration, and then click the Maintenance mode link.
- Select the Put site into maintenance mode check box, and then modify the Maintenance mode message that you want to display to your website's visitors during maintenance.
- Click Save configuration.
Installing the upgrade
- In your COD document root (docroot) folder, examine the following files for any changes that you've made:
.htaccessrobots.txt.gitignore
Save the files or note your changes, because you will have to reapply any changes after you upgrade COD.
- Except for the
sitesfolder and its subfolders (and the.gitfolder if you're using version control — including Git or SVN), delete all files and subfolders from your COD docroot. - Create a temporary folder outside of your docroot, and then extract all of the COD files from the installation archive into the temporary folder.
- In the temporary folder, delete the
sitesfolder and its subfolders. - Copy the contents of the temporary folder into your COD docroot.
- In your web browser, open
http://[site_url]/update.php, where[site_url]is the URL of your COD server.Note
If you use the
drush updbcommand instead ofupdate.php, clear your website's cache using the following Drush command:drush cc all - Reapply any changes you made to the
.htaccess,robots.txt, and.gitignorefiles before the upgrade.
Inspecting your server after the upgrade
- Revert your modules to their default state by running the following Drush command:
drush features-revert-allYou can also examine and revert your modules using the user interface. To do this:
- In the admin menu, go to Structure > Features (
http://[site_URL]/admin/structure/features). - Find a feature not in a default state, and then click its Overridden link.
- Select the check boxes for each overridden component in the feature.
- Click Revert components.
- Click the Features breadcrumb link to return to Structure > Features.
- Continue reverting features and their components until all features are listed with a state of Default.
- In the admin menu, go to Structure > Features (
- The upgrade process does not enable new COD features. Examine the new features added to the Structure > Features page (
http://[site_URL]/admin/structure/features) and enable the features that you'd like to use. - Restore website access for your site visitors. To do this:
- In the admin menu, click Configuration, and then click the Maintenance mode link.
- Clear the Put site into maintenance mode check box.
- Click Save configuration.
Your website now uses the updated 7.x-1.x version of COD to serve webpages and content to your site visitors.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion