8

I'm tring to update using drush, with the command drush up, but core is not updating. it says on the drush output:

Project drupal was updated successfully. Installed version is now 7.27.

but it's not! the status report clearly says the version is still 7.26. Also, I tried running drush again, and it updates successfully from 26 to 27 every time I run it...

UPDATE

I did this command:

drush up drupal -v

and this was the output:

Initialized Drupal 7.26 root directory at /www/permalink.hashworld.co/docs                                                                                                               

    [notice]
Initialized Drupal site default at sites/default                                                                                                                                             [notice]
Loading release_info engine.                                                                                                                                                                 [notice]
Loading version_control engine.                                                                                                                                                              [notice]
Loading package_handler engine.                                                                                                                                                              [notice]
Executing: wget --version
/usr/bin/php  -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_quotes_sybase=Off /usr/share/php/drush/drush.php --php=/usr/bin/php --php-options=' -d magic_quotes_gpc=Off -d    [notice]
magic_quotes_runtime=Off -d magic_quotes_sybase=Off'  --backend=2 --verbose --root=/www/permalink.hashworld.co/docs --uri=http://default  pm-updatestatus drupal 2>&1
 Name    Installed Version  Proposed version  Message
 Drupal  7.26               7.27              SECURITY UPDATE available


Update information last refreshed: Fri, 04/18/2014 - 20:06
Code updates will be made to drupal core.
WARNING:  Updating core will discard any modifications made to Drupal core files, most noteworthy among these are .htaccess and robots.txt.  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? (y/n): y
Executing: svn info /www/permalink.hashworld.co/docs/drupal-7.27
Executing: bzr root /www/permalink.hashworld.co/docs/drupal-7.27
Executing: wget --version
Executing: wget -q --timeout=30 -O /tmp/download_fileN0AtzR http://ftp.drupal.org/files/projects/drupal-7.27.tar.gz
Downloading drupal-7.27.tar.gz was successful.                                                                                                                                               [notice]
Md5 checksum of drupal-7.27.tar.gz verified.                                                                                                                                                 [notice]
Mime type for /www/permalink.hashworld.co/docs/drupal-7.27.tar.gz is application/x-gzip                                                                                                      [notice]
Executing: tar -C /www/permalink.hashworld.co/docs -xzf drupal-7.27.tar.gz
Executing: tar -tzf drupal-7.27.tar.gz
Project drupal was updated successfully. Installed version is now 7.27.
Backups were saved into the directory /home/ubuntu/drush-backups/permalink/20140421094219/drupal.                                                                                         [ok]
Command dispatch complete                                                                                                                                                                    [notice]
/usr/bin/php  -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_quotes_sybase=Off /usr/share/php/drush/drush.php --php=/usr/bin/php --php-options=' -d magic_quotes_gpc=Off -d    [notice]
magic_quotes_runtime=Off -d magic_quotes_sybase=Off'  --backend=2 --verbose --root=/www/permalink.hashworld.co/docs --uri=http://default  updatedb 2>&1
Initialized Drupal 7.26 root directory at /www/permalink.hashworld.co/docs                                                                                                                   [notice]
Initialized Drupal site default at sites/default                                                                                                                                             [notice]
No database updates required                                                                                                                                                              [success]
/usr/bin/php  -d magic_quotes_gpc=Off -d magic_quotes_runtime=Off -d magic_quotes_sybase=Off /usr/share/php/drush/drush.php --php=/usr/bin/php --php-options=' -d magic_quotes_gpc=Off -d    [notice]
magic_quotes_runtime=Off -d magic_quotes_sybase=Off'  --backend=2 --verbose --yes --root=/www/permalink.hashworld.co/docs --uri=http://default  cache-clear all 2>&1
Initialized Drupal 7.26 root directory at /www/permalink.hashworld.co/docs                                                                                                                   [notice]
Initialized Drupal site default at sites/default                                                                                                                                             [notice]
'all' cache was cleared.                                                                                                                                                                  [success]
Command dispatch complete                                                                                                                                                                    [notice]
Finished performing updates.                                                                                                                                                              [ok]
Command dispatch complete                                                                                                                                                                    [notice]
Command dispatch complete   
8
  • Use the 'drush up drupal' command (short for 'drush pm-update drupal') instead of the popular and well-known alias 'drush up' which updates everything at once. Specifying the name of the desired project at the end of a 'drush pm-update' command will target only that Drupal project (i.e. module|theme), and after all, Core itself is a project. Have you run update.php after updating it through drush? Commented Apr 21, 2014 at 6:49
  • Drush can take care of database updates as well. Has to be some other issue I guess.
    – AKS
    Commented Apr 21, 2014 at 6:52
  • Yeah its right that drush take care of database updates as well, I was just predicting if it may be a case as its not reflecting in the status report though drush is showing its updated. Commented Apr 21, 2014 at 6:54
  • Can you run same command with --debug and post results here ? I just ran ~> drush up drupal and it updated core to latest Drupal...
    – Anil Sagar
    Commented Apr 21, 2014 at 6:55
  • Does above update successfully completed ? Do you still see older version ?
    – Anil Sagar
    Commented Apr 21, 2014 at 11:45

2 Answers 2

10
+100

It might be issue with permissions of Drupal root directory.. Try running them as sudo

sudo drush up

Above command updates all enabled modules and core in Drupal...

Try using

sudo drush up drupal

which updates only core.. It worked for me.. I Updated from 7.22 to latest 7.27..

Try with -v for more information..

sudo drush up drupal -v

To debug use below command with --debug option

sudo drush up drupal --debug

2
  • 1
    yes, you're right. Using sudo worked. I'll grant you the bounty as soon as i can... thanks! Commented Apr 21, 2014 at 12:02
  • Awesome :-) Glad it worked !!
    – Anil Sagar
    Commented Apr 21, 2014 at 12:03
2

Update drush to the last stable versión an try again.

If it doesn't work do it manually: (this is tedious but not hard);

  1. Make a backup of your Drupal instance. (For ex: with MySQL)
  2. Download the latest release of your current Drupal version.
  3. Extract the [tar ball or zip] Drupal package.
  4. Set your site on maintenance mode (For ex: How on D7)
  5. Delete all the files & folders inside your original Drupal instance except for /sites folder and any custom files youmadded elsewhere.
  6. Copy all the folders and files except /sites from inside the extracted Drupal package [tar ball or zip package] into your original Drupal instance.
  7. If the update release includes changes to settings.php replace old settings.php in .../sites/default/ with the new one, and edit site-specific entries (eg database name, user, and password)
  8. If you modified files such as .htaccess or robots.txt re-apply those changes to the new files.
  9. Login to your site as administrator or as user no 1 Run update.php by navigating to /update.php
    1. Follow the process to update your Drupal instance Disable maintenance mode.

more info

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.