Upgrading COD

Last updated on
28 April 2017


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.


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

  1. Download the COD recommended release from the COD Project page.
  2. Back up your website's code (everything in the Drupal root directory) and database.
  3. Open a web browser, and then sign in to your website as the main administrator account.
  4. 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:
    1. In the admin menu, click Configuration, and then click the Maintenance mode link.
    2. 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.
    3. Click Save configuration.

Installing the upgrade

  1. In your COD document root (docroot) folder, examine the following files for any changes that you've made:
    • .htaccess
    • robots.txt
    • .gitignore

    Save the files or note your changes, because you will have to reapply any changes after you upgrade COD.

  2. Except for the sites folder and its subfolders (and the .git folder if you're using version control — including Git or SVN), delete all files and subfolders from your COD docroot.
  3. Create a temporary folder outside of your docroot, and then extract all of the COD files from the installation archive into the temporary folder.
  4. In the temporary folder, delete the sites folder and its subfolders.
  5. Copy the contents of the temporary folder into your COD docroot.
  6. In your web browser, open http://[site_url]/update.php, where [site_url] is the URL of your COD server.


    If you use the drush updb command instead of update.php, clear your website's cache using the following Drush command:

    drush cc all
  7. Reapply any changes you made to the .htaccess, robots.txt, and .gitignore files before the upgrade.

Inspecting your server after the upgrade

  1. Revert your modules to their default state by running the following Drush command:
    drush features-revert-all

    You can also examine and revert your modules using the user interface. To do this:

    1. In the admin menu, go to Structure > Features (http://[site_URL]/admin/structure/features).
    2. Find a feature not in a default state, and then click its Overridden link.
    3. Select the check boxes for each overridden component in the feature.
    4. Click Revert components.
    5. Click the Features breadcrumb link to return to Structure > Features.
    6. Continue reverting features and their components until all features are listed with a state of Default.
  2. 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.
  3. Restore website access for your site visitors. To do this:
    1. In the admin menu, click Configuration, and then click the Maintenance mode link.
    2. Clear the Put site into maintenance mode check box.
    3. 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.