- Newest
- Most votes
- Most comments
To upgrade PHP on your Lightsail WordPress instance from 8.2.16 to 8.3, there are a few important considerations:
For Bitnami WordPress instances on Lightsail, the recommended approach is to create a new instance and migrate your data, as Bitnami WordPress stacks don't support direct PHP upgrades. Here's how to proceed:
-
First, back up your current instance by creating a snapshot (this is a best practice before any major changes).
-
Launch a new WordPress instance using the latest Bitnami blueprint. The latest blueprints typically include the most recent PHP versions.
-
Before finalizing the migration:
- 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
- To verify the PHP version on the new instance before fully migrating:
- After creating the new instance, connect to it via SSH
- Run a command like
php -vto check the installed PHP version - If the new instance doesn't have PHP 8.3, you may need to manually upgrade it after creation
For manual PHP upgrades on Linux-based instances (if needed after creating a new instance):
- For Amazon Linux 2023:
sudo yum upgrade php -yfor minor version updates - For Ubuntu:
sudo apt install phpto get the latest version - For other distributions, specific commands vary based on the OS
Remember to thoroughly test your WordPress site on the new instance before switching over your production traffic to ensure compatibility with PHP 8.3.
Sources
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
why does it say the most recent version of php is when it's clearly not. I just created an instance and it was 8.2.29
answered 6 months ago
Relevant content
asked a year ago
asked 4 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
