How do i run an older version of php?

Each release branch of PHP is fully supported for two years from its initial stable release. During this period, bugs and security issues that have been reported are fixed and are released in regular point releases.

After this two year period of active support, each branch is then supported for an additional year for critical security issues only. Releases during this period are made on an as-needed basis: there may be multiple point releases, or none, depending on the number of reports.

Once the three years of support are completed, the branch reaches its end of life and is no longer supported. A table of end of life branches is available.

Currently Supported Versions

BranchInitial ReleaseActive Support UntilSecurity Support Until
7.4 28 Nov 2019 2 years, 10 months ago 28 Nov 2021 10 months ago 28 Nov 2022 in 1 month
8.0 26 Nov 2020 1 year, 10 months ago 26 Nov 2022 in 1 month 26 Nov 2023 in 1 year, 1 month
8.1 25 Nov 2021 10 months ago 25 Nov 2023 in 1 year, 1 month 25 Nov 2024 in 2 years, 1 month

Or, visualised as a calendar:

7.0 7.1 7.2 7.3 7.4 8.0 8.1 1 Jan 2019 1 Jan 2020 1 Jan 2021 1 Jan 2022 1 Jan 2023 1 Jan 2024 1 Jan 2025 1 Jan 2026 Today: 7 Oct 2022

Key

Active support A release that is being actively supported. Reported bugs and security issues are fixed and regular point releases are made.
Security fixes only A release that is supported for critical security issues only. Releases are only made on an as-needed basis.
End of life A release that is no longer supported. Users of this release should upgrade as soon as possible, as they may be exposed to unpatched security vulnerabilities.

Those of you with a WordPress site should know one new technical thing. WordPress uses a language called PHP – it’s installed and runs on your hosting server.

You can let people like our coders/web developers worry about how that works but if you have a website already – read on. This one is easy!

WordPress hosting companies should use the most stable PHP version on their servers. The newer PHP 7.4.8 is two times faster than its predecessors – something you need to consider to improve performance and speed on your website. ⠀

Keren discussed this with our lead coder, Tom and there’s a Q+A below that will help you understand important things like how to check your version of PHP and what it takes to upgrade it.

So, first you need to know what’s the latest, more stable version. You can check here whenever you like for the latest PHP release: https://en.wikipedia.org/wiki/PHP. And as mentioned, there are definite speed benefits if your website is running on the newest stable version.

How do i run an older version of php?

So, now you want to know what you have, for your website, right? As Tom says: “PHP version is not public information. Maybe that’s why a quick Google search did not yield any results for a FREE online service that would detect PHP version for a specified site.”

3 ways to check which version of PHP your website uses/is on. 

Version info:

There is an easy way to check if your hosting company is running a slightly older PHP version. Ask your website programmers to install a WordPress plugin called Version Info plugin.

Visit: https://wordpress.org/plugins/version-info/

Upon activation, the plugin will show which PHP version is being used – you see it in the footer area of your WordPress admin dashboard. If your website is using a version lower than PHP 7, then ask your hosting provider to update it for you. If they are unable to do so, reach out and we can advise!

WPP Analyzer

There is also a paid service that can provide a list of all technologies used on-site, including PHP and its version. See https://www.wappalyzer.com/lookup. They also have a free Chrome extension

However, if your hosting provider has strict rules implemented (and most of them have strict rules implemented!), the PHP version will not be shown.

Ask your hosts

You can also email your hosting providers, and ask them “what version of PHP is my website running on?”. Tip – put the URL in your subject if you’re working with humans, helps them understand which one, as they have lots of clients!

What tests need to be done when the upgrade is done so we know the site works?

Each new PHP version introduces new features, syntax editions, depreciated things. The latter 2 are the most common causes for things breaking after a PHP version upgrade. A developer will most probably have to tackle syntax changes here and there, replace deprecated functions or features with new ones, meaning he will have to learn new things.

Plugin upgrades are also important because one should expect to have updated plugins for a new PHP version.

How long does it take for us to do the upgrade for TLD hosting?

It takes 5 mins to upgrade PHP version. WP maintenance varies depending on how many new things there are in the new PHP version that are affecting the site. If you upgrade constantly, it will most probably take up to 30 mins to do the maintenance work on the site. However, if you upgrade, say from an old 5.6 to 7.4, it can take much longer (2-4 hours) or might even be impossible to upgrade. This is especially If specific plugins, themes or features are too heavily dependent on the PHP version that they had been created on. For instance, we cannot upgrade [one of our clients] to PHP 7, because their bought theme is not compatible and probably is no longer under development.

How long does it take for TLD to upgrade, if you host elsewhere (usually)?

If we can choose desired PHP version in the Control Panel, it’s easy and it takes 5-10 mins. Otherwise, we need the hosting provider to do that. If you are working on a dedicated server you need to hire a server administrator to do this type of job, as it’s quite complicated. 

If they host elsewhere what info / logins do they need to send us?

Control panel login details, where we will either look for PHP version select list or simply add a new help ticket in order to request PHP upgrade from the hosting people. They will either perform the switch or transfer our files to a different server machine running that PHP version.

What are the risks if you don’t have the latest version of PHP?

Let me put it this way: the biggest risk is choosing a bad hosting provider!

These days a good hosting provider can easily build a system where you can toggle between PHP version and choose your preferred one. Or they can even implement automatic PHP upgrades, should you wish.

Other than that, security and speed are the most significant risks. And, to look at it another way, the benefits would be huge. Tom found a graph on Kinsta showing the speed improvement running WP 5.3 on different version of PHP.

How do i run an older version of php?

See https://kinsta.com/blog/php-benchmarks.

We hope you find this article useful, and dare we suggest, interesting!

Let us know if you need us to help, we’d love to connect over PHP!

PS: check out the video we got the featured image from:

How do I use an older version of PHP?

In short what you need to do is:.
Ensure the php packages for the version you want are installed..
Update any configuration for that PHP version..
Update your web server configuration to point to the correct PHP version..
Point PHP CLI to the correct PHP version..
Restart your web server and php-fpm..
Mask the old php-fpm daemon..

How do I change my PHP version?

Changing the PHP version.
Navigate to the Manage Websites page..
Click the Manage button to the right of your domain..
Under the PHP section, click the Modify icon..
Choose a version of PHP from the dropdown menu..
Scroll down and click the Change PHP Version button to save your changes..

Is PHP 5.4 still supported?

PHP 5.4 end-of-life date is September 14, 2015.

Is PHP 7.3 still supported?

Support for PHP versions 7.1 and 7.2 has already expired, for 7.3 it ends on December 06, 2021.