
One morning the site answers with a blank page, or with a curt HTTP 500. Nobody touched anything, they all swear, the site included. If it runs on Joomla 3, the cause is almost always just one: the server has moved to a new version of PHP.
Why it happens
Joomla 3 stopped receiving updates in 2023 and was written for PHP versions that are now out of support. When the hosting upgrades PHP, say to 8.3, the old code hits a fatal error and the site stops, admin panel included. You can't even get in to see what's going on: it's like being locked out of the house with the keys inside, and the house has disconnected the doorbell too.
At that point there's always someone who raises a finger and pronounces the sacred formula: “We've always done it this way and it's always worked”. Absolutely true. Until eight o'clock this morning.
The three roads
- Going back to an old PHP: gets the site back on its feet in five minutes, but on software with no security updates. It's a patch, not a solution: a sticking plaster on a dam, which holds up beautifully until it rains.
- Moving to Joomla 4 and then 5: the official road, in stages. It works if the installed extensions have compatible versions. If one was abandoned by its author years ago, the stage turns into a pilgrimage.
- Migrating straight to Joomla 6: you rebuild the site on a clean base and bring the content across. It's the right road when the site uses abandoned components.
How we do it
First of all a test copy, separate from the public site and rebuildable from scratch with a script. It's our secret laboratory under the mountain: anything can blow up in there, and outside nobody hears a thing. That's where the content gets converted, the dead extensions replaced and every address checked.
# checking redirects after the migration
grep -c " 301 " controllo_url.log
grep " 404 " controllo_url.log | head
Translated: the first line counts the addresses redirected correctly, the second shows the first ones that can no longer be found. The number I dream of at night, for the second, is zero.
URLs are sacred
The most delicate point is the page addresses: years of links and rankings pass through them. With a custom plugin the historic addresses stay identical, and the changed ones get their 301. Google mustn't notice a thing. It should think the site has just been to the hairdresser.
The grand comeback
Only when the copy is perfect do we go to production. The site comes back online on a base that will last years, not months, and the 500 error becomes an anecdote to tell at dinner. At a dinner of sysadmins, that is: the other guests usually leave before dessert.