How to update drupal 7 core using drush
For anyone reading this who is not familiar with Drush, it is a command line tool used to manage a Drupal installation and run all kinds of Drupal commands. Such as: run cron, clear caches, make backups, install modules etc. If you do Drupal development and are not using Drush, you really should. It saves you time and makes working with Drupal more enjoyable by not having to click around the Drupal admin interface that much.
Drush is your friend. Luckily there is also a sites keyword that executes the command on all sites of a multisite installation. It will list all the sites and ask for a confirmation before executing, so you always know when you are running a command on multiple sites. According to Drupal Core update instructions the update process involves more or less the following steps:.
Also, it is always best to do a trial run of the complete update process on a test server before updating production environment. There are some Drush commands that can be used to sync a Drupal database to a remote server that help you in managing a mirrored testing server, but those are out of the scope of this post.
I will now describe the Drush commands I used to accomplish the above steps and update my multisite Drupal. Please note that the commands listed here are for Drupal 7 and Drush 5, so the commands may vary for different versions.
Most Drush commands also have a shorthand version but I will be using the full commands in this post to better illustrate what each command is doing. To completely backup a Drupal installation, you need to backup the files and the database.
Drush has two different commands for backup purposes; archive-dump and sql-dump. The former backs up everything including files and database as the latter only dumps the database.
Since the archive-dump command wraps everything in a single file, including Drupal core and all the files, I did not want to run it on all of the 62 sites and thus getting 62 tarballs with the same Drupal core code base.
So I decided to use the sql-dump command in Drush and create one tar file of the whole Drupal root manually. By Alvin Alexander. Last updated: June 17, If you have made any modifications to these files, please back them up before updating so that you can re-create your modifications in the updated version of the file. Note: Updating core can potentially break your site. It is NOT recommended to update production sites without prior testing. Do you really want to continue? Installed version is now 8.
Notes on how to update a Drupal 8 website with Drush and Composer. Why is status still displayed as unupdated? I have followed all the steps to upgrade Drupal core from 7. Running Cron shows that I have Drupal Core 7.
To ensure the security of your server, you should update immediately! See the available updates page for more information and to install your missing updates. I have also tried going back to version 7. Did you check that drush actually changed the correct files on your system. You may find it is misconfigured. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Drupal: updating with Drush doesn't change update status Ask Question. Asked 12 years, 4 months ago. Active 6 years, 9 months ago.
0コメント