Upgrade a Bitnami WordPress Production-Ready Stack deployment

The easiest way to upgrade the Bitnami WordPress Production-Ready Stack solution is to upgrade the CloudFormation stack.

Bitnami publishes a new version of the CloudFormation template, updating the AMIs used in it, whenever there’s a new version of the application or any subcomponent (such as PHP, Apache or OpenSSL) included on it. By replacing the template used on your Bitnami WordPress Production-Ready Stack stack, you will upgrade it.

All the data, application files and database, are stored outside the application instances on Amazon EFS and Amazon Aurora (RDS) respectively. Therefore, replacing the AMIs will not result in any data loss.

Update the CloudFormation template

NOTE: It’s highly recommended to create a backup of your database and application files before upgrading your stack. Learn more about creating and restoring application backups.

You can replace the template used on your CloudFormation stack as follows,

  • Obtain the new template URL from the application page.

  • Log in to the AWS CloudFormation console and select your stack.

  • Select the “Actions -> Upgrade Stack” menu item.

    Upgrade Stack

  • On the “Select Template” page, chose the option to “Specify an Amazon S3 template URL” and enter the new template URL you obtained earlier. Click “Next” to proceed.

  • On the “Specify Details” page, review the configuration parameters (there should be no need to make changes). Click “Next” to proceed.

  • On the “Options” page, review the tags (if any) and click “Next” to proceed.

  • Review the details of the template and accept the required terms.

    Template Details

  • A summary of the change is detailed in the “Preview your changes” section. Review it and click “Update” to proceed.

    Upgrade Stack

Amazon Web Services will now begin the upgrade process. It can take some time to complete the upgrade. Use the CloudFormation dashboard to periodically check the status of the upgrade.

Upgrade Stack

Once the stack update is complete, follow these steps:

  • Log in to the AWS EC2 console.

  • Choose “Instances” from the navigation panel and ensure that all the application instances use the latest AMI version. You can filter the list using the tags you set when deploying the template.

  • Terminate any instances using the old AMI. The AutoScaling Group will create new instances automatically using the new AMI.

  • Log in via SSH to your WordPress instance and use the WordPress CLI tool to update the database schema by running the command below:

      $ sudo -u daemon wp core update-db

Update the plugins and themes via CLI

Plugins and themes are stored in the shared file system and therefore won’t be updated when updating the template. These must be updated manually

The recommended way to update plugins is with the WordPress CLI tool. To update a plugin using WP-CLI, follow the steps below:

  • Log in via SSH to your WordPress instance.

  • List the available plugins with the command below:

      $ sudo -u daemon wp plugin list

    The result should be a table like the one below:

      | name           | status   | update    | version |
      | akismet        | inactive | none      | 4.1.1   |
      | jetpack        | inactive | available | 7.0     |
      | ...            | ...      | ...       | ...     |
  • Individually update the plugins which have new versions available. For example:

      $ sudo -u daemon wp plugin update jetpack
Last modification March 8, 2019