vmwaredrupal

Upgrade Drupal

Drupal 7

It is advisable to create a backup before starting the update process. If you have important data, create and try to restore a backup to ensure that everything works properly.

Upgrade using Drush

You can upgrade the application only without modifying any other stack components. Starting with Drupal v7.12-3, the Bitnami Drupal Stack ships drush, a command-line shell and scripting interface for Drupal. To upgrade Drupal with drush, use the following commands:

$ cd /opt/bitnami/apps/drupal/htdocs/
$ drush update

More information is available on the Drush website.

Upgrade using built-in tools

To upgrade Drupal without drush, use Drupal’s built-in mechanism for upgrades by following the steps below:

  • Log in to the Drupal administration panel.

  • Browse to the “Administration -> Configuration -> Development -> Maintenance mode” section. Enable the “Put site into maintenance mode” checkbox and save the configuration.

  • At the server console, download the new Drupal version:

    $ wget http://ftp.drupal.org/files/projects/drupal-X.Y.tar.gz $ tar -xzvf drupal-X.Y.tar.gz

  • Create a backup of the .htaccess and settings.php files:

    $ cp /opt/bitnami/apps/drupal/htdocs/.htaccess /home/bitnami/.htaccess.backup $ cp /opt/bitnami/apps/drupal/htdocs/sites/default/settings.php /home/bitnami/settings.php.backup

  • Overwrite the old Drupal installation with the new files:

    $ sudo cp -R drupal-X.Y/* /opt/bitnami/apps/drupal/htdocs/

  • In case your older installation used custom .htaccess or settings.php files, restore them from backup.

  • In the Drupal administration panel, browse to the “Report -> Status” section and run the database update script if necessary.

Drupal upgrade

  • Browse to the “Administration -> Configuration -> Development -> Maintenance mode” section and disable maintenance mode.

Drupal 8

Upgrade using Drush

You can update Drupal core with a minor version change using drush a command-line shell and scripting interface for Drupal that is already included in Bitnami Drupal Stack. To upgrade Drupal with drush, follow the steps below:

  • Log in to the Drupal administration panel.

  • Browse to the “Administration -> Configuration -> Development -> Maintenance mode” section. Enable the “Put site into maintenance mode” checkbox and save the configuration:

Drupal Maintenance mode

Enable the Maintenance mode

  • Create a backup of the .htaccess, settings.php and robots.txt files:

    $ cp /opt/bitnami/apps/drupal/htdocs/.htaccess /home/bitnami/.htaccess.backup $ cp /opt/bitnami/apps/drupal/htdocs//sites/default/settings.php /home/bitnami/settings.php.backup $ cp /opt/bitnami/apps/drupal/htdocs//robots.txt /home/bitnami/robots.txt.backup

  • Change your working directory to the Drupal application:

    $ cd /opt/bitnami/apps/drupal/htdocs/

  • Upgrade the application using drush updating command:

    $ drush pm-update

  • In the Drupal administration panel navigate to the “Report -> Status” section to check that your site has been successfully updated.

Drupal Report Status: successful update

  • You can also check it in the “Report -> Available updates -> Update” section.

Drupal projects are up to date

  • Restore the backup of the .htaccess and robots.txt files:

    $ cp /home/bitnami/.htaccess.backup /opt/bitnami/apps/drupal/htdocs/.htaccess $ cp /home/bitnami/robots.txt.backup /opt/bitnami/apps/drupal/htdocs/robots.txt

  • Browse to the “Administration -> Configuration -> Development -> Maintenance mode” section and disable maintenance mode.