Install very old PHP versions to support outdated websites

I was installing Local and fixing some issues that occurred in this post.


On my old installation, I was using Local mainly to keep supporting old WordPress installations that run on, for instance, PHP 5.6 only (eek, I know). My process was:

  • changing everything in a secure local environment (I know my station and the tools installed)
  • exporting the site as static website
  • uploading the static website

This worked fine, with the added advantage that those websites are super fast. It helped me supporting content updates to websites of customers, that are related to Ebeneezer Scrooge and did not “require” a new website.

Local now works for the properly updated websites (and also comes already with PHP 8.3 - great!) and those old beasts can finally be laid to rest.

But for posterity’s sake, I have a question: Is it possible to somehow hack Local so that it installs an old PHP or even MySQL version? From what I see there are “lighting services” that contain those servers?

Hi @davidsneighbour

We generally try to keep things as current as possible and also keep the community updated when something is being updated or dropped off like when we cut PHP 5.6 here.

We do have a feature request for some users requesting to be able to use older versions of PHP here as well. We’ve also seen users in the past create requests for a specific version of PHP (i.e. 7.0)

As far as “hacking” Local to install an older version of PHP I’m not sure how viable that is. I can’t say it’s something I’ve tried or have documentation to give you but others in the community may have some tricks to share. We’ll always recommend utilizing the latest PHP/WP versions when possible to maintain the best site security and performance, but we will always keep at least the last two or three previous versions readily available in the app for users to work with.

I know for using older versions of WordPress one of our users made a simple plugin here:

1 Like

I agree that security and performance are more critical. You would, however, not believe how many people come to me with years-old installations that are not upgradable due to plugins and themes being incompatible. This is just another point in my list to convince people to update their website’s infrastructure regularly and fix issues along the way. Funny how some languages have a term for “repair”, but not “maintenance” :wink:

Thanks for your explanations.

1 Like

I can imagine! We often get users both on the Local and the hosting side who are trying to resurrect or maintain sites without updating anything. Some get complacent when a breaking change in PHP/WordPress hasn’t been introduced in awhile and then suddenly nothing works.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.