PHP5 is Dead
PHP5 is the version that most websites are using. It reached “end of life”, EOL End of life means that this version of PHP is no longer being maintained, supported or developed. You can use it (at your own risk), but there will be no more releases. This mean no more bug fixes, no more vulnerability patches and no more enhancements. You can see unsupported branches of PHP here.
PHP 5 was officially retired in December 2018.
As of August 2019 over 62% of websites running PHP were still using PHP 5 though.
What’s the Big Deal?
Well, from a website owner or user perspective, it really isn’t. If a website is running, no problem right?! Sure,that is until a website quits functioning as expected and there is no quick fix. Then you’re in crisis mode.
As long as a web host continues to support the version the older version PHP you are running, you are OK. Sooner or later though, your host will force an upgrade. They do not want security vulnerabilities on their servers.
Most of the time software upgrades are pretty minor. There may be some additions of features, or removal of outdated standards that may require a code edit or two. The upgrade to PHP 7 has a significant change in how PHP connects to a database though. If your site is still connecting to MySQL in the “old way”, your website will no longer function if you try to upgrade to PHP 7.
“Why am I just hearing about this now?”
Since June 2013, PHP code has been throwing notices in error logs like this:
PHP Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
I get it that a website owner may be oblivious to this significant change. As a site owner though, you have a responsibility to keep on top of technology to keep your website secure and up to date. Compare it to when your car has a recall. You may hear something on the news about it, or get a postcard in the main that get’s added to the junk pile. It’s up to you to seek this information out and get the fix addressed.
It has been 6 years now since this change has been communicated. Between your website developer, or web hosting company, somewhere along the line it has probably been mentioned (and possibly ignored) that an upgrade is needed.
Recap: Why Upgrade PHP?
Think about your PC or your phone. They are constantly pushing out code upgrades. You never think a thing of it. You may have auto updates turned on. Or, whenever a notification is pushed to you, you click “ok” and go back to what you were doing. Since every website is a stand alone custom application, auto updates are a little more scary. (Even within WordPress, each site is customized with a different theme and plugins. So the default install may be the same, but they are all customized differently. Upgrading WordPress code can have complications.)
There are a few really good reasons to keep your PHP code upgraded. The biggest reason I have mentioned is security. Here are a few other
- Speed – PHP7 is fast. Really fast – like 3x faster than PHP5.6 (I upgraded a site the other day from PHP5.4 to PHP7.3 Page load time decreased from 3.3 seconds to 2 seconds. 60% decrease in page load time)
- New features – from a web developer perspective – there are new features added that did not exist in prior versions.
- WordPress wants you to run PHP7 – and keep WordPress up to date! WordPress maintenance is a completely separate post. : )
Once your code is ready for PHP7, Upgrading PHP on your server is pretty easy. You can do it within cPanel with a click of a button. If the option is not there, send your web hosting support a ticket telling them you want to upgrade your website to PHP7.
Website Redesign and Upgrade
If your website is at least 5 years old, and you have not been addressing regular website maintenance, most likely your code is connecting to the database with mysql_connect. This needs addressed in order to upgrade your code to PHP7. There is no way around it. Depending on how large and complicated your website is, along with how efficiently your programmer wrote code, this can be a large or small undertaking. Just this week I upgraded a website I coded in 2014. It took me 4 hours to upgrade all of the code. Last month I completed another upgrade to PHP7 on a large custom web application I wrote in 2014. It took me 3 months.
I can’t tell what the level of effort would be without logging into the web server and reviewing the source code.
If your site is at least 5 years old, it is most likely time for a website redesign too. Web development standards and technology changes all the time. In the early days of the Internet people were doing website redesigns “for the fun of it”. Websites weren’t complicated. Everything was a novelty (flying envelopes, neon changing backgrounds…)
As websites have developed into extensions of businesses, generating significant revenue though things have changed. Designs often match a company brand and web tools have been developed to incorporate functionality like eCommerce to sell product and services or generate leads. Most likely a significant amount of money has been invested into a business website.
The idea of investing another chunk of money to keep it upgraded seems to be over looked by many. I have multiple clients that I have been telling for years that they need to upgrade their website code. These sites need rebuilt, not some maintenance or minor code upgrades. Each time I mention it, there is some other priority that take precedence. Since all appears to be working ok now, they do not want to be bothered with it. If you don’t do something before its a problem, it will come back and bite you (hard).
All websites should be running the current version of PHP 7. At some point your host will force it. If that happens your website will cease to function if you are using the old way to connect to the database. Can your business afford extended downtime while you search for a web developer to upgrade your website or rebuild it?
“How do I know what version of PHP I am running?
There are a couple ways to check what version of PHP you are running. The easiest way if you are not a web developer is to contact your host and ask them. If you are familiar with cPanel you can log in and check there.
The chart below shows supported versions of PHP. As of Jan 2019, PHP7.2 and PHP7.3 are the only actively supported versions. If you are not running PHP7.2+ you should upgrade your website code.
Supported Versions of PHP
Comments are closed.