Skip to content

How to update PHP version in AWS Lightsail Wordpress?

0

I have several AWS Instances with Wordpress. Their versions will change, but there does not seem to be a straight forward way to update it. How do I do it?

Also when creating a new instance, Wordpress version is 6.8.1 not 6.8.3, the latest. So how do I move forward?

Is there a better and still cheap way to host wordpress here that makes this process easier?

asked a year ago475 views

1 Answer
0

For Bitnami WordPress instances on Lightsail, direct PHP upgrades are not supported. The recommended approach is to create a new instance and migrate your data. Here's how to proceed:

  1. First, back up your current instance by creating a snapshot (this is a best practice before any major changes).

  2. Launch a new WordPress instance using the latest Bitnami blueprint. The latest blueprints typically include the most recent PHP versions.

  3. Migrate your data from the old instance to the new one:

  • Export the content from your current WordPress instance
  • Save your wp-config.php file from the current instance
  • If you're using a static IP, prepare to detach it from the current instance
  1. To verify the PHP version on the new instance before fully migrating:
  • Connect to the new instance via SSH
  • Run php -v to check the installed PHP version

Regarding WordPress versions not being the latest (6.8.1 vs 6.8.3), you have two options:

  1. Use the WordPress admin dashboard to update to the latest version after setting up your new instance
  2. Wait for AWS to update their Bitnami blueprints with the latest WordPress version

For maintaining WordPress on Lightsail, there are two main approaches:

  1. Use the upgrade feature within WordPress admin for WordPress core, themes, and plugins (note that this doesn't update PHP)
  2. Create new instances with the latest blueprints when you need to upgrade both WordPress and PHP

Remember to thoroughly test your WordPress site on the new instance before switching over your production traffic.
Sources
Upgrade PHP in Lightsail Instance Linux/Wordpress | AWS re:Post
Upgrade PHP on Lightsail | AWS re:Post
Community | Migrating to WordPress on AWS Lightsail for Easier Maintenance
Advice on upgrading old Bitnami site. | AWS re:Post

answered a year ago

AWS
EXPERT

reviewed a year ago

AWS
EXPERT

revised a year ago

  • edited agent response to remove some unclear alternatives which were largely not relevant.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.