PHP is an important part of your WordPress website. Today I’ll cover what exactly PHP is, how to check what version of PHP you’re running and how to update PHP (if needed).
What is PHP?
PHP is a server-side scripting language used by WordPress. WordPress uses PHP to build each web page you see. It does this in a number of ways — by getting content from the database, validating permissions, checking options, calling plugins — the list is endless.
What version of PHP am I using?
WordPress phpinfo() allows you to see what version of PHP you’re running (in addition to some other related information).
Install and activate the plugin, then go to Settings, PHP Info.
I’m running version 7.0.
Wait, what version of PHP should I be using?
As of this writing, you should be using PHP version 7.1 or greater according to php.net.
Each release branch of PHP is fully supported for two years from its initial stable release. After this two year period of active support, each branch is then supported for an additional year for critical security issues only. Once the three years of support are completed, the branch reaches its end of life and is no longer supported.
Because PHP version 7.0 was released in December of 2015, that means it’s only supported with security updates for another 17 days!
Upgrading PHP with SiteGround
I thought that my version of PHP would be updated automatically with SiteGround. I contacted customer support and they said that wasn’t the case!
They pointed me towards an article on how to switch to a different PHP version and the PHP Version Manager in cPanel. They also advised that although version 7.3 is an option, it’s still in pre-release and shouldn’t be used in production.
Upgrading was as easy as choosing the folder, choosing version 7.2 and clicking Save.
And when I checked PHP Info again, I saw that PHP had indeed been updated.
Technology is ever-changing and WordPress is no different! Keeping your WordPress site up to date (including your version of PHP) will not only provide the best user experience, but keep your site secure as well.