On November 28, 2022 PHP 7.4 died and went to development language heaven. I know what you are thinking, ‘Who cares? Isn’t that Cyber Monday?’ Yes. But if you don’t think this is a big deal, then you are about to be in for a Cybersecurity-filled Saturday.
Why You Should Update Your Website to PHP Version 8?
To keep it simple, you should update because the code your application or website is built on is no longer supported by the builder. Your code is out of warranty from the manufacturer. Meaning you can continue to use it, but they will not make updates to that codebase anymore. You’re subjecting your customers, prospects, staff and stakeholders to something that is old and out of date. Also, as time goes on and there is more wear and tear on your project – hackers find ways to get into old code, new browsers won’t support sites built it in it, new devices also may not render it properly. In other words, it becomes a DVD player in a streaming world.
Mohamed Kassem, Computan’s WordPress Development Project Manager and the esteemed individual who tasked yours truly with writing this blog, suggests that sites and apps not using PHP 8 are ticking time bombs. “It’s true Sajeel.” Kassem said. “I needed you to write this quickly because sites and code on older versions of PHP are ticking timebombs for data breaches and very bad things.”
What the benefits you’ll see from upgrading to PHP Version 8?
Obviously streaming is way better than DVDs right? No discs, no damage and you can take your stuff with you anywhere. Same with upgrading from PHP 7.4 to 8. API requests are 3 or 4 times faster – so if you have a HubSpot integration running an old PHP version that takes time to sync data between one system and HubSpot upgrading instantly makes that integration run 3-4 times faster. Like anything security evolves as threats evolve. It’s much easier to break into a door with an old and broken lock then one with a new finger-print reader security system, isn’t it? Not that anyone here who blogs on a developer website is a hardened criminal or anything.
Haseeb Ilyas, a Project Manager at Computan and the team’s cybersecurity expert, notes that upgrading gets you access to tons of new site features and plugins that otherwise aren’t available on older sites. ‘It’s an easy yes.’ Said Ilyas, “upgrading to PHP 8 unlocks many features and functions site owners and marketers can easily add to their website that they wouldn’t be able to do otherwise.”
Ok, How do I upgrade my WordPress site (or WordPress sites) to PHP Version 8?
To put it bluntly. IT people will say it’s easy, but you shouldn’t do it yourself. Below are the general steps to follow (using Star Wars analogies for added emphasis):
- Attack of the clones – Clone everything you need to upgrade. Make backups and configure them ideally on a separate server or location from where your live site is. You need to do an experiment and that requires testing.
- Execute Order 66 - Run the upgrade and see what happens. What breaks? What stays the same? Note as many issues as you see.
- A New Hope – Now that you know what might break you can go and make the necessary edits to the site, plugins and other areas to make sure the live site will function when you go and update that.
- Return Of The Jedi – Now the circle is complete. Find an off-peak time, run the upgrade and deploy the changes on staging to the live. Test and monitor everything for a few days, keep a closer eye on customers and don’t get too mad about the odd client email or two.