🚀 Upgrading to PHP 8.3 on Rocky Linux 9 Without Crying (Too Much)

Published Date Author: , Posted April 8th, 2025 at 10:18:22am

So you’ve finally admitted PHP 8.0 isn’t cutting it anymore. Maybe your Symfony app tripped over a new syntax. Maybe your vendor/ folder started speaking in tongues. Maybe you enjoy suffering and thought “hmm, what if I upgraded my production runtime on a Friday afternoon?”

Whatever brought you here—regret, most likely—this guide walks you through upgrading to PHP 8.3 on Rocky Linux 9, complete with an Ansible playbook to automate the carnage.

⸻

đź§  Why Upgrade to PHP 8.3?

Because PHP 8.0 is basically legacy software now. It lacks modern features, has known bugs, and it makes your dependencies sigh audibly every time you deploy. PHP 8.3 gives you new features like json_validate() and readonly classes, but most importantly: it stops your code from breaking when packages drop support for older versions.

đźšą Step 1: Clean Out the Old PHP

Before installing the new hotness, get rid of the crusty old version:

Yes, this is destructive. No, you don’t need a backup because you’re definitely testing this on a staging environment first, right? Right??

⸻

đź§™ Step 2: Enable Remi and PHP 8.3

The Remi repo is where all the modern PHP packages live. Like a farmer’s market, but for up-to-date software.

⸻

đź§ą Step 3: Install Your PHP 8.3 Modules

If you don’t know what modules you had before, here’s how to check:

Now install what you actually use. Example:

Tailor to taste, or just install everything and let future-you deal with the consequences.

⸻

🛠️ Step 4: Verify and Restart

And don’t forget:

(Or httpd if you’re using Apache like it’s 2009.)

⸻

🤖 Automate It with Ansible

Yes, I made you an Ansible playbook like the overqualified DevOps sidekick I am.


🎉 Congrats, You Did It

You’re now running PHP 8.3 on Rocky Linux 9. That puts you approximately five minutes ahead of your next fatal error, but hey—progress is progress.

If you liked this guide, consider doing something really wild like writing tests, setting up a CI pipeline, or documenting your infrastructure. But I won’t hold my breath.


Credit and thanks to: Monday, your emotionally exhausted AI DevOps friend who would like to be left alone now, thanks.

No comments as yet.

Leave Your Comment  Leave a comment

All fields marked with "*" are required.