Updating Bitnami WordPress AWS Image PHP Version: A Step-by-Step Guide

Bitnami is a popular platform that offers easy-to-use server solutions for deploying web applications. One of its widely used products is the Bitnami WordPress AWS image, which is a pre-configured Amazon Machine Image (AMI) designed to run WordPress on Amazon Web Services (AWS) cloud infrastructure.

However, as the PHP language evolves, it becomes necessary to update the PHP version in the Bitnami WordPress AWS image to ensure compatibility and security. By default, Bitnami does not provide any auto upgrade functionality. You need to manually update the PHP version by launching the latest instance with update Bitnami copy and migrating your WordPress.

In this blog post, we will guide you through the process of updating the PHP version in the Bitnami WordPress AWS image by creating a new, updated Bitnami instance and attaching the image.

Note: If you want to install WordPress on AWS, read my previous blog: How to host WordPress site on AWS ec2.

Step 1: Launch a latest Bitnami WordPress instance

The first step is to launch a new Bitnami instance on AWS. You can do this by following these steps:

  1. Log in to the AWS Management Console.
  2. Click on “Launch Instance” and search for “Bitnami WordPress” in the AWS Marketplace.
  3. Select the latest version of the Bitnami WordPress AMI and choose the appropriate instance type and region for your needs.
  4. Configure the instance settings, including security groups, key pairs, and storage.
  5. Review and launch the instance.
Latest WordPress Image at the time of writing

Step 2: Create a backup of your current Bitnami instance

Before updating the PHP version on your current Bitnami instance, it’s essential to create a backup of your instance to avoid data loss. You can do this by following these steps:

  1. Stop the current WordPress instance.
  2. Create an Amazon EBS snapshot of the instance’s root volume.
  3. Make a note of the snapshot ID.

Step 3: Migrate data from old Bitnami instance to new Bitnami instance

Once your new Bitnami instance is ready, you need to migrate your WordPress data from the old Bitnami instance to the new one. You can do this by following these steps:

  1. Install All-in-One WP Migration if you have not installed on your current WordPress already.
  2. Click on the Left Menu of All-in-One WP Migration and export to file.
  3. Once the zip file is ready, Login to the admin panel of latest WordPress instance and install All-in-One WP Migration in new instance too
  4. Once installed and activated, click on left menu -> All-in-One WP Migration -> Import and select the file you just downloaded.
  5. If your zip file is more than allowed upload limit, you can increase upload_max_filesize and post_max_size in php.in located at /opt/bitnami/php/etc/php.ini. These numbers should be greater than file size
  6. Restart the services by running sudo /opt/bitnami/ctlscript.sh restart
  7. You should now be able to run Step 4.

Step 4: Associate Elastic IP to new Instance

you need to test it to ensure that everything is working correctly. Before that it is necessary to update ElasticIP of new instance. The IP address of new instance should be same as old one. Do the following to Re-associate ElasticIP:

  1. Goto your AWS Console -> EC2 -> Elastic IP

2. Select the Existing WordPress Elastic IP and Click Associate Elastic IP from Actions dropdown.

3. Check Reassociation -> Allow this Elastic IP address to be reassociated and then click Associate.

Step 5: Install the SSL certificate using Letsencrypt

Your website should now start working but will show Invalid certificate error. We will need to install SSL certificate to remove this error.

  1. Login to your instance ssh -i "yourkeyfile.pem" bitnami@public-ip-address
  2. Then install certificate by running sudo /opt/bitnami/bncert-tool
    • It will ask for domain name -> Enter your existing WordPress domain name
    • and follow the instructions
  3. Restart all services once again: sudo /opt/bitnami/ctlscript.sh restart
  4. Visit your WordPress website to ensure that it’s functioning correctly.
  5. Test all the website’s features to ensure that they’re working as expected.

Remember to delete your backup image if you do not want to incur extra cost.


Updating the PHP version in the Bitnami WordPress AWS image is crucial for compatibility and security. By following the above steps, you can easily update the PHP version in the Bitnami WordPress AWS image by creating a new, updated Bitnami instance and attaching the image. Remember to create a backup of your current instance before updating the PHP version and test the new instance thoroughly to ensure everything is working correctly.

Leave a Reply

%d bloggers like this: