Upgrading concrete5

Prior to Upgrading

You should always perform a database backup prior to upgrading a Concrete5 site.

Once your backup is complete, choose your upgrade method. There are a few ways to upgrade a Concrete5 site.

Remote Update: Upgrade Completely Through the Dashboard

If you head to Dashboard > System and Settings > Backup and Restore > Update Concrete5, you can download updates from concrete5.org. These will be unzipped into your root updates/ directory, and you will be able to choose when to apply them to your site. Updates to concrete5 may not be available as quickly through this interface as they are from the website.

Manual Dashboard Update

Since the method above simply delivers a Concrete5 directory to your updates directory, you can manually perform the first half of these steps, and use the Dashboard to complete the update process.

  1. Download the latest core from http://www.concrete5.org/download
  2. Unzip the file. Remove all contents except the concrete directory.
  3. At this point you should have a folder named something like concrete5.7.x.x, with only a "concrete" directory inside it.
  4. Move the concrete5.7.x.x folder into your updates/ directory.
  5. Head to Dashboard > System and Settings > Update Concrete5. The update should be listed, and you can click through to update to the latest version.

In both cases, an update.php file will be written to your application/config directory specifying the specific version you're updating to. The directory will continue to exist within the updates/ directory.

Replacing the original concrete Directory (Version 8 and above)

If you want to minimize disk space usage and don't need to use the web interface for update Concrete5, you can replace the original concrete directory with a new version, and then upgrade through a particular route.

  1. Download the latest core from http://www.concrete5.org/download
  2. Unzip the file.
  3. Replace these items in the web root with the ones you downloaded:
    1. the concrete directory
    2. the composer.json file if upgrading from a version prior to 8.2.0
    3. the composer.lock file if upgrading from a version prior to 8.2.0
  4. Visit your site in a browser.

That's it! concrete5 version 8 and above will automatically run any database migrations that need to be run to bring the site up to date.

Upgrading via the command line (Version 8 and above)

The version 8 upgrade in particular is a large one. It makes a lot of transformations to the concrete5 database, and sometimes these can take awhile. If you find that the concrete5 upgrade times out in your browser, or has some kind of error, you can try upgrading via the command line:

  1. Download the latest core from http://www.concrete5.org/download
  2. Unzip the file.
  3. Replace the concrete directory in the web root with the concrete directory you downloaded.
  4. ssh into your web server.
  5. From within your web directory, run the command:

    concrete/bin/concrete5 c5:update

Confirm that you want to run the update. The migrations that are applied should be printed out to the console, along with any upgrade notices about what the specific upgrade is doing.

Replacing the original concrete Directory (5.7.5.10 and earlier)

If you want to minimize disk space usage and don't need to use the web interface for update Concrete5, you can replace the original concrete directory with a new version, and then upgrade through a particular route.

1.1. Login as the super user or someone in the Administrators group. You must do this because upgrading a Concrete5 site requires that the user attempting to do so have access to the "Upgrade Concrete5" permission. By default this is people in the Administrators group (or the super user.) 1. Download the latest core from http://www.concrete5.org/download 2. Unzip the file. 3. Replace the concrete directory in the web root with the concrete directory you downloaded. 4. Visit the URL http://www.yoursite.com/ccm/system/upgrade. You should see a message about an upgrade being available. Click through to upgrade your database to the most recent version.

Emergency: Disable Upgrade Permissions Protection

If you have copied the concrete directory over the old directory, and now wish to upgrade, but forgot to login prior to copying the directory (and you can't login due to the upgrade causing issues since it has not yet run) you can momentarily disable the permissions protection by modifying a configuration value on the web server.

Create a file named concrete.php in the application/config/ directory, or open it if it already exists. If the file is empty, copy this into it:

<?php
return array(
    'updates' => array(
        'enable_permissions_protection' => false
    )
);

If the file isn't empty, just add the enable permissions protection key to the existing array. Once the upgrade is complete, remove this file or the line (to re-enable upgrade permissions protection).

Loading Conversation