Drupal Upgrade

How to upgrade Drupal

This tutorial explains in simple steps how to upgrade your Drupal application to the latest stable version.

Upgrade Using Softaculous

To update your Drupal website using Softaculous, you first need to go to your cPanel > Softaculous tool. Then click on the All installations button and locate your Drupal website

After you find your website, click on the Upgrade icon next to it. This icon will appear in case Softaculous detects a new version of your application and if the tool is able to perform the upgrade.

You would be redirected to the upgrade where you might choose a version to upgrade to. You may also tick the Create a Backup before upgrading option in case you have not created a backup before the upgrade.

Once you choose the desired options, just click on the Upgrade button. When the upgrade process is finished you would be taken to a page with instructions for the final upgrade step. To complete them you should go to your cPanel -> File manager -> public_html -> drupal_new/sites/default folder and open the settings.php file for editing.

Edit the following line:

and change it to:

The changes above will allow you to run the update.php script from your browser.

The next step is to update the database of your Drupal. Go to http://yourdrupalwebsite.com/update.php where yourdrupalwebsite.com is a variable that should be replaced with your actual domain name. The screen should look similar to the one below.

Click on the Continue button and follow the instructions. A list with the pending updates will be published. You can check them. Click on the Apply pending updates button to perform the update. If there are no errors reported, your Drupal application is successfully upgraded.

Important!Due to security reasons you should turn the $update_free_access variable back to false in the settings.php file.

That's it! You have successfully updated your Drupal 8 website!

Upgrade Using Drush

In order to upgrade your Drupal web site using Drush, you should first log in your account via SSH. Detailed instructions on how to use SSH can be found in our SSH tutorial. After you login to your account via SSH, navigate to the Drupal installation’s home folder.

Then run the following command below to check for available updates:

After the check for updates, you should enable maintenance mode on your website using the command below:

Afterwards clear the application's cache:

To begin with the actual upgrade, execute the command below:

After the application's core is upgraded, you should make sure to update the database as well.

Update entity, if any required entity updates are needed:

The final step would be to simply deactivate maintenance mode and clear the cache once more:

That's it! You have successfully updated your Drupal 8 using Drush.

Upgrade Drupal Manually

The first step is to visit the official Drupal site and download the latest stable release of Drupal.

Once the download is complete, you need to upload the new version of Drupal on your website. The safest way to do that is to create a new folder in the public_html directory of your website, e.g. drupal_new, and upload the new version package there. Then you need to extract the archive file through cPanel -> File Manager.

If you don't have cPanel, you can extract the archive on your computer and upload its contents to your account using your favorite FTP client.

Once you have the new version uploaded in the drupal_new folder, you should copy the necessary files and folders from the old version of Drupal to the new one.

Here we assume that you already have a full backup of your live Drupal site. Navigate to the backup folder of your Drupal site and copy the .htaccess file and the all directories except core/ and vendor/, and upload them into the drupal_new folder by overwriting any existing files.

Now, go to your cPanel -> File manager -> public_html -> drupal_new/sites/default folder and open the settings.php file for editing.

Edit the following line:

and change it to:

The changes above will allow you to run the update.php script from your browser.

The next step is to update the database of your Drupal. Go to http://yourdomainname.com/drupal_new/update.php where yourdomainname.com is a variable that should be replaced with your actual domain name. The screen should look similar to the one below.

Click on the Continue button and follow the instructions. A list with the pending updates will be published. You can check them. Click on the Apply pending updates button to perform the update. If there are no errors reported, your Drupal application is successfully upgraded.

Important!Due to security reasons you should turn the $update_free_access variable back to false in the settings.php file.

Open a new window in your browser and point it to the site you have just upgraded. As we performed the upgrade in a test folder drupal_new you should point your browser to: http://yourdomainname.com/drupal_new/

Once you are sure that the upgraded version of the site works properly you can delete or rename the old folder to drupal_old and rename drupal_new to drupal in order to put the new version live.

That's it! You have successfully updated your Drupal 8 website!