PHPMatters Help You Better Hosting Your PHP-based Sites
How to Update Drupal to the Latest Version for Both Security and Work Efficiency

How to Update Drupal to the Latest Version for Both Security and Work Efficiency

update drupalDrupal is a powerful content management system for you to build an excellent website. However, as it enjoys great popularity and supports thousands of websites all around the world, it is more likely to be attacked by some bad guys. Especially after the Drupal team coming out a new release, the bugs in the previous version will go public, which offers more convenience for hackers to attack your Drupal site. Therefore, it is necessary for you to update your Drupal to the latest version for both security and work efficiency consideration.

When we say update Drupal versions, we refer to update the minor versions, namely from Drupal 7.1 to 7.2, other than to upgrade the major versions, like from Drupal 7 to Drupal 8. Generally, minor versions are released to fix the security issues and newly discovered bugs. And to upgrade the major versions is to change the core and Drupal function.

In the following content, we are going to offer you the tutorial on how to update Drupal to the latest minor version.

Preparation before Upgrading

Before you start to update your Drupal site, make sure that your system meets the minimum requirements of Drupal, including the disk space, web server, database and PHP. You can visit this page to view the detailed requirements.

Secondly, you should backup Your Drupal Site. Always remember to back up all the related data whenever you need to upgrade your website. In this case, you can create a backup folder to place all the files. This step is very important because you never know what would happen during the upgrading process. Once there are some unexpected problems, all your endeavors before would be in vain. The things you need to backup include .htaccess file, robots.txt, sites directories and file directories, etc.

In addition, you should make sure that all the modules and themes are able to be compatible with the latest Drupal major version.

Download & Upload the Latest Version to Your Site

The next step is to download the latest version of Drupal from its official site. After that, it is time for you to upload it to your Drupal website. For safety consideration, we recommend you to create a new folder, namely drupal_latest, in the public_html directory and upload the new release you have just downloaded to it. Note that you should extract the archive file through file manager or FTP program.

drupal official site

Copy the Necessary Files & Folders to drupal_latest

As long as you successfully upload the new version, you need to copy all the necessary files and folders from the existing files of your Drupal site to the new folder drupal_latest. Next, you need to find the .htaccess file, robots.txt, sites directories and file directories in your backup folder and then copy them to the drupal_latest. In this process, the old existing files can be overwritten.

Update Your Drupal Database

Now, go to “” and update your Drupal database by following the instructions. If you cannot run your update.php script successfully, you can find setting.php in cPanel > File manager > public_html > drupal_latest > sites > default folder. Then what you need to do is to change

update free access false code


update free access true code

After completing the update, you should remember to change it back to

update free access false code

Check the Pending Updates

The last step is to check the pending updates by clicking the “Apply pending updates” button to work the update. If it doesn’t report any error, the upgrade of your Drupal is successfully completed.

A Simpler Way to Update Drupal to the Latest Version

You may think that the steps above are a little bit complicated. In the following, we have also prepared you a much easier method to update Drupal to the latest version.

First of all, you should make sure you have made backups for your Drupal site.

Secondly, you can check if there are some available updates reported in your “Configuration” page. All the available updates are going to be marked in red.

According to the red mark, you are able to make the updates with ease. Your Drupal will offer you a link to the download file of the latest version, just as the image shows in the following.

download files

Next, you need to upload the updating files to your old Drupal sites files in your cPanel > File manager or FTP program by overwriting the old files. If you successfully upload the new files, the “Available updates” page will be marked in green.

Now you are able to finish the updates by a few clicks. First, go to the “Modules” page and click the sentence marked in the screenshot below. Next, click “Continue” button and then “Apply pending updates”. Thus, your Drupal site has been updated to the latest minor version. You can put your Drupal site online again by going to the “Administration pages”, then clicking “Configuration” and “Maintenance mode”.

drupal update script

Visit this Drupal page to get more inspiration to optimize your Drupal website.