Drupal 7 core update. Drupal core updates. Enabling and tracking updates in Drupal

For those who do not know what major and minor versions of a site are, a little explanation: major versions of Drupal are 6, 7, 8, and minor versions are 7.1, 7.2, 7.34...

Now let's move on to the actual material of our lesson. The core of the Drupal platform was recently updated, so many users are interested in how to update it themselves.

The modules of this site are updated with special built-in tools. To do this, you do not need to have special knowledge or skills. But the kernel simply cannot update automatically. You need to update it yourself.

Fulfill kernel updates practically necessary immediately after the release of the new version. Updates begin with installing the latest version of Drupal. To do this, click on the link to available updates in your message stating that the system urgently needs to be updated.

After this, you need to perform a full backup of the resource (all files contained in the site directory on the server along with the database located on your host).

Now on the resource you need to go to the section called “Configuration” and in the “Development” tab select “Maintenance Mode”. Near the form for transferring the resource to maintenance mode, you must put the appropriate mark (tick). These settings must be saved.

By going to the site folder on the server, you will need to delete all files related to the core of the site, except for robots.txt and .htaccess (provided that they were previously edited, which you would not want to lose when updating the Drupal core), as well as the folder , except sites (since it stores all the working materials of your site).

Important! Let me draw your attention to the phrase " delete all files related to the core of the site ", files from various webmasters (google, Yandex, etc.), other files that are not related to the standard Drupal core DO NOT NEED TO BE TOUCHED.

Important! If your work uses a distribution like the commercial Kickstart, then the folder called profiles should be left. In this case, all data is simply copied and then replaced with more recent information.

Now from the archive of the new kernel, which we downloaded at the beginning of the lesson, we will need to extract all the files and upload them to the server, into the folder of our website, which we have just cleared of all unnecessary things. But there are exceptions, yes, you guessed it, sites (well, robots.txt with .htaccess if you didn’t delete them) are left.

After this, go to your_site/update.php and confirm Drupal requests at all steps.

After an automatic message appears on the monitor that everything has been successfully updated, you can go to the main page of your site and perform a control check. If everything works well, then you need to turn off the site maintenance mode.

After these simple steps, the Drupal core will be the latest version.

Well, a couple more tips for beginners:

  • You shouldn't store information in the kernel. It is for this reason that during the kernel update, all files except three folders were deleted. A folder called sites is a place to store system files that you work with. There is no information that needs updating.
  • If the module called updates is disabled by the user, the system will not automatically inform you about the release of a new kernel version. In this case, the possible presence of such updates is checked manually. Morality? Installed Drupal activated updates(site core module, comes as standard), we forgot about problems with updates.
  • I could write forever about site backups and how important they are, but until you lose a resource with a bunch of materials because someone, we won’t specify who, was too lazy to make a backup before starting updates, you are unlikely to feel the full benefit of these routine actions.
  • Remember about site security and you will be rewarded according to your merits for your foresight. What am I getting at? One of the biggest security holes in Drupal is the files from the root of the site readme.txt, license.txt, copyright.txt, changelog.txt, maintainers.txt, in which you can easily find all the necessary information about what the site has “under the hood” "and according to the school tutorial, "hack such and such a site with such and such a version of the kernel for dummies" will darken the life of the site administration for many days, even weeks... So, we delete these files immediately after installing/updating the system. They are not used in the operation of the resource, so this does not threaten you in any way, but such a little thing may well make the life of someone who wants to hack your site a little less sweet.

Having gained sufficient experience in updating the Drupal core (as well as modules and themes), I ask you to remember one simple, but very often overlooked thing by programmers: always make a backup! If it is possible to save a backup copy of both MySQL and the file structure, make the most of it. And now everything is in order...

So, let's imagine the following situation. We have a website running on Drupal version 6.22 using quite popular modules views, pathauto, transliteration and so on. We have to update drupal core up to the latest, 7th version. It is worth noting that at the time of our updates, there is already a version Drupal 6.24, and the latest stable version is Drupal 7.12.

Action plan:

  • Update the Drupal 6 core to the latest, stable version. Those. up to Drupal 6.24
  • Update all modules to the latest versions
  • Prepare the current installation Drupal 6.24 to migrate to a new version Drupal 7.12.
  • Install the latest versions of used modules for Drupal 7.12.
  • Update/redesign the template used in Drupal 6 to the current version
  • Prepare the site for launch on the updated installation
  • Reward yourself with beer

For our tasks there is a wonderful tool called drush and if you have access to the server via SSH, the update will take a few minutes, but I will tell you about this method in the next article.

  1. Download the latest, stable version of Drupal 6 and the latest versions of the modules we use that need updating.
  2. Before updating modules and the kernel, we make a backup of the database using phpMyAdmin. If it is possible to use automatic “dumpers”, no one forbids it, we use it!
  3. We put the site into maintenance mode.
  4. We update the Drupal core, to do this we delete all files from the root of our site except for the sites folder(meaning that everything absolutely all files used by our site(themes, modules, css, images, etc.) are located in the sites/domain name folder). After removal, upload the latest version of the kernel to the root of the site - Drupal 6.24. Yet again, except for the sites folder. It’s logical, we already have it. :)
  5. We update all modules to the latest versions, not forgetting to update the database structure using the file update.php.
  6. If the site uses themes downloaded from drupal.org, they also need to be updated.
  7. We change the design theme to one of the standard ones, I recommend Garlad.
  8. Disable caching and clear the cache.
  9. After updating all modules and themes making another backup our database. This backup is a stably working site with all updates at the moment. When migrating to Drupal 7, I consider this backup to be the most important. Let's move on.
  10. Disable All third party modules.
  11. We remove all languages ​​other than English.
  12. Log out from the administrator account.
  13. Download Drupal 7.12
  14. Delete all files again except for the sites folder and upload it to the root of Drupal 7.12 (bypassing the sites folder).
  15. We logged out from the administrator account - we need to allow updating the site structure without checking for the administrator role, for this we make the necessary changes to the settings.php file of our site.
  16. We run update.php and update our database structure for Drupal 7.
  17. After the update procedure, we make sure that our site works without errors, if this is not the case, we eliminate them. In any case, we have a backup. :)
  18. Again, we make a backup.
  19. We install the modules used for Drupal 7 latest versions one by one. After installing each module, we update the database using update.php.
  20. We redesign/download the design theme for the Drupal 7 version.
  21. We are preparing the site for launch (adding the Russian language, updating translations for all modules and the core, etc.).
  22. We are removing the site from maintenance mode.

Drupal 7 core update

Before upgrading, back up your files and database

Upgrade between major versions

6.x and 7.x (before upgrading to version 7.x, update Drupal to the latest version in the 6.x branch, and also update all additional projects to the latest versions).

Check the availability of the necessary projects for the 7.x branch. If some projects for the new branch are not ready, then you may decide to postpone the update.

  1. Go to the “Management - Configuration - Maintenance” page and put the site into maintenance mode
  2. Go to the “Management - Site Building - Themes” page and select the Garland theme
  3. Go to the “Management - Site Construction - Modules” page and turn off all additional modules. If you know that you will not need some of the current modules in the new version and you do not need their data, then delete them through the “Removal” tab, and then delete their files. Leave the remaining module files in place
  4. Delete the sites/default/default.settings.php file
    • If you made changes to the .htaccess and robots.txt files, you will need to make changes to the new files
  5. Make sure the sites/default/settings.php file is writable (it will be converted to 7.x format during the upgrade process)
  6. Delete the additional project folders for version 6.x and copy the project versions for version 7.x in their place (read the UPGRADE.txt file of each project
  7. Go to the page “Management - Site Construction - Modules” and enable one additional module
  8. Run the update.php script by going to the URL example.com/update.php. This action will update the plugin tables in the database
  9. Make a backup of your files and database after the update.php script finishes running

Then enable the next module and if the update is successful, make a backup copy again. Repeat this between each module update so that if a problem occurs, you can revert to the latest update. If an update error occurs when running the update.php script, restore the previous state of the site, save the error message and ask for help on the forum. Do not continue updating until the problem is resolved and skip error messages.

If there is a version of the theme for Drupal 7.x, then enable it.

Upgrade between minor versions

For example, 7.0 and 7.1 (there is no need to update between minor versions sequentially; for example, if you have version 7.0 installed, you can immediately update Drupal to version 7.2).

  1. Log in to an account that has the “Manage updates” right
  2. Go to the “Management - Configuration - Development - Maintenance” page and put the site into maintenance mode
  3. Delete the kernel folders except for the sites folder and the kernel files in the root folder
    • If you made changes to the .htaccess and robots.txt files, you will need to make changes to the new files, make a copy of them locally
    • If the version includes changes to the default.settings.php file (see version notes), then the changes will need to be made to the new file
  4. Unpack the files of the new version in place of the deleted old ones
    • Make changes to the .htaccess and robots.txt files (if necessary)
    • Create a settings.php file by copying and renaming it from the default.settings.php file and make changes to it (if necessary)
  5. Run the update.php script by going to the URL example.com/update.php. This action will update the core tables in the database
  6. Go to the “Management - Reports - Status” page and make sure that all indicators are normal
  7. Go to the “Management - Configuration - Development - Maintenance” page and take the site out of maintenance mode

CMS Drupal– this is a very dynamically developing system, thanks to the huge global community.

Individual modules are updated daily, and the core of the system itself undergoes periodic significant changes, mainly in terms of security. This is a serious reason to keep the core of your website system always up to date.

On May 8, a new release of the Drupal 7 core version – 7.28 – appeared on the official website drupal.org. Today I have free time, so I decided to update the core on my sites and write a small guide on this topic for beginners.

I will describe the standard method of updating the kernel, which is recommended by the system developer.
There are other methods for updating the Drupal core, but let's start with a simpler one to make it easier to understand the essence of this task.

1. First, you need to make a backup of the database and files of the site itself. For which I advise you to use the best, in my opinion, methods - these are FileZilla FTP Client and phpMyAdmin.
Make sure to do this, otherwise, having lost your data, you may reproach yourself for saving a few minutes and putting the site down. Of course, you can always restore the site, but it’s unlikely that you will have all the information.

2. Log in to your site with administrator rights.

3. Put the site into maintenance mode. Go to the site maintenance page “Configuration – Development – ​​Maintenance Mode”, check “Put the site into maintenance mode” and save the settings.

4. Update all modules and themes installed on the site to the latest versions.

5. Change the theme, put Garland.
Go to the themes page, enable "Garland" and select it as the default theme. If you used a separate admin theme, select "Garland" for your admin theme.

7. Using FileZilla FTP Client, upload the pre-downloaded and unpacked Drupal core to your hosting - all folders and files in the root directory, with the exception of sites.
Return files such as google*******.html, wmail*******.html, yandex*******.txt if you have them, and of course robots.txt from downloaded backup of your site.
Make sure that the .htaccess and settings.php files contain the data you need.
Make your settings.php file writable, as the update process may require it to be converted.

8. Run the update script - update.php then clear the cache

9. Set your site's theme as default.

10. Don’t forget about the tmp folder in the root of the site, set the permissions to 777 in the properties. Otherwise, after updating the Drupal core, this folder is overwritten and a message constantly pops up on your site - The file cannot be created

Here is the entire process of updating the major version of the Drupal 7 core.
I will describe other methods, including the use of drush, in another article.

Hi all! From time to time a new version of Drupal is released. And then the question of updating the system arises. In this article I will tell you in detail, how to update Drupal in just 10 steps.

Unfortunately, Drupal does not provide automatic updates. Personally, this unpleasantly surprised me. How is this possible? After all, in the same WordPress and Joomla, all you need to do is press a couple of buttons, and everything happens without our participation. There is no such thing here. Everything will have to be done by hand.

Be sure to create a . If something goes wrong, an error occurs during the process and the functionality of the site is disrupted, you can quickly roll back to the old, proven version of Drupal. Timely backups will help avoid irreparable loss of data and nerve cells.

Updating Drupal for the first time will not be so easy, but since new versions of the kernel are released with enviable regularity, you will very soon get the hang of it, and this will not cause any problems. For now, just follow the instructions I have given below. Be careful and everything will end well.

1. You can learn about the availability of a new version from a notification in the control panel or from a letter sent to the administrator’s email. To verify this, go to the “Reports” - “Available Updates” section.

Click the “Download” button on the left and download the latest (recommended) version of Drupal.

Also pay attention to what the current update includes. If the list contains the settings.php file, which contains information about the database, then it will need to be replaced with a new one, and then manually edited - enter the old data about your site (located in the /sites/default directory).

2. We transfer the site to “Maintenance” mode. The site will be closed to visitors, which will allow all further operations to be carried out quietly. Go to the “Configuration” - “Maintenance Mode” section.

Check the box next to “Put the site into maintenance mode” and save the settings.

4. We go to the server using and delete all old files, with the exception of the /sites folder and some files that were changed during operation. First of all, this is a file with a sitemap.xml.

5. Upload the files of the new version of Drupal to the server. Everything except the /sites directory and the .htaccess, robots.txt files (the sitemap.xml sitemap is not included in the standard Drupal package).

Once again I would like to draw your attention to the settings.php file from /sites/default. If it is included in the list of updates, then you will have to replace it with the new version manually, and then enter the data for your site.

7. Open the already painfully familiar settings.php file for editing. We find the line in it:

$update_free_access = FALSE ;

and change it to:

$update_free_access = TRUE ;

Save the changes made. Now you can start working with the database.

8. Go to the address http:/vash_sayt.ru/update.php. Of course, you need to use your own domain name. We get into the Drupal database update program. Everything is simple here.


9. To make sure that the Drupal update was successful, go to the “Reports” - “Available updates” section. Opposite the current version there should be a green checkmark and the word “Updated”.

10. Takes the site out of the “Maintenance” mode - uncheck the box in the “Configuration” - “Maintenance Mode” section.

As you can see, updating Drupal is not that easy. I recommend practicing on . For the first time, everything may not go as smoothly as we would like. Although, having up-to-date backup copies of files and databases at hand, there is nothing to be afraid of.

That's all for today. Thank you for your attention! It will only get more interesting!



If you find an error, please select a piece of text and press Ctrl+Enter.