There is a distinct flavor of anxiety that hits when you look at your websiteโ€™s admin dashboard and see a warning flag: Your PHP version is outdated and no longer supported.

If you are running your website or app on an AWS EC2 instance or an Amazon Lightsail server powered by a Bitnami stack, your first instinct might be to log in, run sudo apt-get upgrade, and call it a day.

Stop right there. Take your hand off the keyboard.

Because Bitnami handles server architecture differently than a standard Linux setup, running a blind upgrade command is a one-way ticket to a broken website and a stressful afternoon.

Letโ€™s take a journey together through the right way to update a Bitnami server. We will unlock the terminal, decode the language of server tutorials, and get your system running on the latest, most secure tech stackโ€”completely stress-free.

Understanding the Language of the Terminal

Before we paste a single line of code, we need to understand what we are actually doing. Server tutorials often read like ancient spellbooks. Letโ€™s demystify the terms you will see throughout this guide:

SSH (Secure Shell): Think of this as a secure, text-only portal that lets you sit inside your remote AWS server from the comfort of your own computer.

The Stack: Bitnami uses “stacks.” Instead of installing Linux, then Apache, then MySQL, and then PHP separately, Bitnami bundles them into one tightly locked box. They live together in their own little world, usually inside a directory called /opt/bitnami.

The Catch: Because this box is self-contained, standard system updates (apt-get) cannot touch your PHP, Apache, or Database versions. To change the core engine, you don’t upgrade the boxโ€”you build a brand new, modern box and move your stuff into it.
Now for the fun part.

Stepping Inside the Server (The SSH Connection)

To fix a server, you have to talk to it. If you are using Amazon Lightsail, AWS makes this incredibly easy. You can simply click the orange “Connect using SSH” browser terminal icon on your instance dashboard.

If you prefer using your computerโ€™s terminal (or an app like PuTTY), you will use your private SSH key file (a .pem file downloaded from AWS) and run a command like this:

ssh -i /path/to/your-key.pem bitnami@your-server-ip

Once the terminal screen clears and you see the iconic, blocky ASCII art that spells out BITNAMI,” you are officially inside.

Choosing your path

Depending on what you actually need to update, you have three paths forward.

Path A: You just need to patch security vulnerabilities (In-Place System Update)

If your PHP and database versions are fine, but you want to make sure the underlying Linux operating system is secure against recent vulnerabilities, you can run an in-place update.

Inside your terminal, type:

sudo apt-get update && sudo apt-get upgrade -y

Once it finishes downloading and processing, give the server a quick restart to finalize everything:

sudo reboot

You need to update the Application (e.g., WordPress or Ghost)

If you just want the newest features of your CMS, you can usually do this right from the web browser. For WordPress, head to your Dashboard -> Updates and click Update Now. The Bitnami environment allows the application layer to update itself seamlessly.

The Big One โ€” Upgrading PHP, Apache, or MySQL

This is where most people get tripped up. If you need to move from an old PHP version to a modern one, you cannot do it on your current server. You must perform a Migration Upgrade.

Here is how the dance works:

1. Pack the bags on the old server

Log into your current AWS or Lightsail server via SSH. We need to grab a copy of your database. Run this command (replacing bitnami_app with your actual database name, like bitnami_wordpress):

mysqldump -u root -p bitnami_app > /home/bitnami/website_backup.sql

Next, compress your website media and files into a single archive:

cd /opt/bitnami/apache/htdocs
sudo tar -czvf /home/bitnami/files_backup.tar.gz .

2. Spin up a fresh canvas

Go back to your Amazon Lightsail or AWS EC2 console. Launch a completely new instance, choosing the absolute newest version of the Bitnami blueprint available. This new server will natively have the latest versions of PHP, Apache, and database software pre-configured and optimized.

3. Move the data across the cloud

You need to move your backup files from the old server to the new one. You can download them to your local computer first, or use a direct command line transfer (scp) from your old server to push the files to your new server’s IP address:

scp -i your-key.pem /home/bitnami/*_backup.tar.gz bitnami@NEW_SERVER_IP:/home/bitnami/

4. Unpack on the new server

SSH into your brand new server. It’s time to drop your old data into the new, modern environment.

Restore the database:

mysql -u root -p bitnami_app < /home/bitnami/website_backup.sql

Extract your old files into the new web directory:

sudo tar -xzvf /home/bitnami/files_backup.tar.gz -C /opt/bitnami/apache/htdocs/

Finally, give the new Bitnami services a kickstart to recognize the changes:

sudo /opt/bitnami/ctlscript.sh restart

Flipping the Switch

Open a private browsing window and type in your New Serverโ€™s IP address. If you followed the steps, your website should load beautifully, exactly as it looked before, but running on a screaming fast, modern infrastructure.

The very last step is seamless. Go to your AWS or Lightsail networking console, detach your Static IP (or Elastic IP) from the old, tired server, and attach it to the new server. Within seconds, your domain name points to the new machine.

Keep the old server running for a few days just to be safe. Once you are confident everything is stable, terminate the old instance to stop paying for it.

Youโ€™ve done it. You navigated the unique quirks of the Bitnami architecture, kept your data safe, and successfully modernized your server like a seasoned system administrator.