Is it necessary to Upgrade to PHP 7?
It is official and PHP 5 will no longer be supported with security fixes, starting on the 1st of January 2019. That means that even if a vulnerability is discovered, it would not be fixed, leaving your website vulnerable to potential attacks.
PHP 7 has many performance improvements over PHP version 5. PHP 5 has many known bugs that relate to performance, memory usage and more. PHP 7 is actively supported and developers are therefore able to implement those improvements and make your website run faster, be more stable and use your expensive resources more efficiently.
As an added benefit, PHP 7 also allows the use of more modern programming structures, which is a nice benefit for software developers.
How can I find out my PHP version?
If you are using WordPress and running the Wordfence security plugin, simply go to “Tools”, then click on the “Diagnostics” tab at the top right. Scroll down to the “PHP Environment” section and you will be able to see your PHP version on the right side of the page.
If you have FTP access to your website, you can create a file with a name (ex:phpversioninfofinder.php) that is difficult to guess. Add the following two lines:
<?php
phpinfo();
Save the file in your web root directory and then visit the file in your web browser. Your current PHP version will be displayed at the top of the screen. Don’t forget to delete your temporary file once you’re done.
Which specific version of PHP 7 should I upgrade to?
Ideally, you should upgrade to PHP 7.2 that is the latest. This version will be fully supported for another year and will receive security updates for a year after that.
If you are unable to upgrade to 7.2, then at a minimum you should upgrade to PHP 7.1. Full support for PHP 7.1 will end in 1 month. However, there is a possibility of receiving security updates for another year after that.
It is not advisable to just upgrade PHP 7.0 as this version may also become end-of-life very soon.