PHP v7.2 Mandatory Update Notice
What is PHP?
PHP is a server-side scripting language that is designed for web development. WordPress is built primarily with PHP, among other scripting languages, to make your websites functional.
Server-side means that the actions and logic exist on the website owner’s server (where your website is hosted) and not on your visitor’s computer.
Why is PHP updating their version?
The PHP development team releases different versions of their scripting language for a variety of reasons, which may include:
- Improved performance (speed)
- Reducing memory usage
- Adding features and new functionality
- General Bug Fixes and Patches
- Improving security
Which PHP versions should I be aware of?
Most WordPress sites on WP Engine were built with PHP version 5.6, which was released in August 2014. Version 5.6 and version 7.0 will no longer be supported by the end of December 2018, which means any critical issues or security flaws with those versions will no longer be fixed. PHP v7.2 is currently the most stable version and should be the version you switch your site to. A graph of the state of each PHP version is below:
What will happen if I don’t update my site?
Since security flaws and critical issues are no longer fixed with a non-supported versions of PHP, your site is much more susceptible to malicious activity. Updating to the most stable version ensures you have the latest features and support necessary to run your website with minimal negative impact.
How do I update the PHP version on my site?
You should contact your web administrator in order to update the PHP version on your site. If you have access to your web server, you should have an option to update within the dashboard. Before clicking update, make sure you have accurately prepped your site to support the new version. Continue reading to get more info on this process…
What should I be aware of when updating the PHP version?
Depending on which version your site is updated from, some features and functionality may be lost once your site is updated to v7.2. Because of this, your site may experience downtime, or display errors, until those features/functionality are updated with the standards in the newer version. You can also remove the features from your site until a fix is put in place for them.
The core version of WordPress supports PHP v7.2; however, your theme, plugins, or any custom development on your website may be calling functions/methods that are no longer accessible in v7.2. If this occurs, your site will error and will be non-responsive.
Before updating your website, you should check the following:
- Your WordPress Version
- Which plugins your site is actively using
- The theme your website is using
- Review any documentation where you purchased your theme to verify if it is compatible with the desired PHP version
- Any custom files not in a theme or plugin directory that is not part of the standard file structure in WordPress
What is the ideal path forward to update my site to the newest PHP version?
Depending on your hosting environment, they may offer tools or a staging environment where you can update your version without impacting your live site. If your site does not offer a staging environment, you can use a plugin call “PHP Compatibility Checker”, which will run through your theme and plugin files to determine what is supported with the newest version.
If your hosting provider offers a staging environment you can follow the steps below to ensure your live site is not impacted by this update.
Plan to update PHP version with a Staging Environment
- Run a PHP Checker
- (If using WP Engine ) Run WP Engine’s PHP Test Drive on the Production Environment
- The PHP Test Drive tool allows you to test the site on the newest version of PHP without updating it. This is the quickest way to notice errors on the site without doing a full upgrade. The steps below are still necessary in order to ensure a full PHP version upgrade does not affect site functionality
- The PHP Test Drive Tool only shows errors visible to you on the site front, it does not log errors in the back end, which is where the steps below are needed
- (If your site is not hosted with WP Engine) Run the PHP Compatibility Checker Plugin
- This is a tool built by WP Engine to run on any site, which will scan all of your theme and plugin files to determine if the newer version is compatible
- Note: You may need to increase the ServerAliveInterval in order to keep the connection open for a longer time than the default setting on your server. If you
- (If using WP Engine ) Run WP Engine’s PHP Test Drive on the Production Environment
- Setup error logging on your Production Site (if not setup already)
- Run through these steps in order to generate a log of errors on your site: Click Here (Redirect to WP Beginner tutorial)
- Copy the Production environment to the Staging Environment
- Upgrade to your desired PHP version on your Staging Environment
- Run through the site’s pages and determine if errors/issues are found
- If yes, document the error and page before moving forward with development to fix (some issues may be more than a quick fix and could result in removal or rewriting of features on your sites)
- If no errors are found anywhere on your site, copy the staging environment to your production environment and update the PHP version on your production environment