Tuesday 26 March 2019

Update Drupal Core software with Drush/Admin Interface

Update Drupal 8 Core software

Requirement: Drush (If want to update with the help of Drush)
Note: In case of live site, test this process development environment before running on production environment.

Follow below steps:
1. Take complete backup of site.
2. Edit settings.php (/sites/default/settings.php) in notepad++ or any text editor. Find  "$settings[update_free_access]" variable. By default, due to security reasons, it is set "FALSE". 
Update this variable to "TRUE" as below:
$settings['update_free_access'] = TRUE;
3. If you are using any caching technique, Disable it.
4. Put your site in maintenance mode by going to admin > configuration > Development > Maintenance Mode url is /admin/config/development/maintenance.
5. If composer is already in used to manage dependencies, Run the composer update and visit the http://www.example.com/update.php in browser. Now click continue in the first screen to run the updates and successfully complete the script.

6. If you are not using composer then follow below steps.
     a. Download the latest Drupal core file from the drupal.org Drupal Core Software
     b. Extract downloaded file in any temp folder.
     c. Delete the core and vendor directory and all files that are not in sub-directory like .htaccess, composer.json and autoload.php. Do not delete custom files which you have created or customized.
     d. Copy core, vendor directory as well all non-custom files(that are deleted) from temp directory to site directory.
     e. Visit http://www.example.com/update.php. Click continue in the first screen to run the updates. Run the Drush command: drush updb   
     f. If there is any error or warning, re-run the update.php again till all the updates have been completed successfully.
7. Update again settings.php file with "FALSE" value of the variable $settings['update_free_access'] as below : $settings['update_free_access'] = FALSE;
8. Now put your site out of maintenance mode by going to admin > configuration > Development > Maintenance Mode url is /admin/config/development/maintenance.
9. Clear cache.
10. Enable caching techniques which is disabled before update.
11. Now verify the updated version by going to the admin > Reports > Status Report.












No comments:

Post a Comment