Important Points To Consider Before and After Updating PHP Version For WordPress Website

WordPress recommends a hosting provider with PHP version of 7.3 or greater for safety, security and better performance of WordPress websites. Updating PHP version may cause issues to some of the features and functionality of the WordPress website due to incompatibility of 3rd party plugins or themes to the PHP version. In this blog post, we will discuss about important things to consider before and after updating PHP version for WordPress website.

Things To Consider Before Updating PHP Version

Backup

It’s always good to have a complete backup of your WordPress website and database before updating PHP version (or any other change) so that it can be reverted back if something goes wrong. To learn more about how to backup a WordPress website, please visit the official guide by wordpress.org website.

Existing Server Settings

Sometimes we make changes to the php.ini file in order to change the server side settings e.g updating maximum upload file size, memory limit, time limit, maximum post size etc. You can have a backup of the php.ini file (available inside the PHP folder on the server) of previous PHP version for reference and comparison with the php.ini file of the new PHP version. Moreover, if you have WordPress version 5.2 or greater then you can access the existing server side settings by visiting WordPress dashboard -> Tools -> Site Health -> Info Tab -> Server. Take a screenshot of that page for later reference.

Existing Server Settings WordPress Website - How To Safely Update PHP Version For WordPress Website
Existing Server Settings WordPress Website – How To Safely Update PHP Version For WordPress Website

Things To Consider After Updating PHP Version

After updating PHP version, test the website completely to check if there are any issues with the functionality or features of the WordPress website. If you see any issues with the functionality of the website then you can try following solutions.

Updating Existing Server Settings

As stated in previous section, “Sometimes we make changes to the php.ini file in order to change the server side settings e.g updating maximum upload file size, memory limit, time limit, maximum post size etc.” We can check the current server settings by visiting WordPress Dashboard -> Tools -> Site Health -> Info Tab -> Server and compare these settings with the server settings we saved in the previous section (Existing Server Settings). If they are same, well and good otherwise we can update these settings in the php.ini file of the new PHP folder on server. You can search for the variable names (of each setting) inside the php.ini file and update with the previous values. Following is a list of variables you might be interested in updating depending upon previous server settings.

  • PHP max input variables ( max_input_vars )
  • PHP time limit (max_execution_time)
  • PHP memory limit (memory_limit)
  • Max input time (max_input_time)
  • Upload max filesize (upload_max_filesize)
  • PHP post max size (post_max_size)

Troubleshooting Compatibility Issues

If updating above server settings doesn’t fix the issues then it maybe possible that some 3rd party plugin or theme code is incompatible with the new PHP version. You can try following steps to find which plugin or theme is causing the issue.

Step 1

Disable the current active theme and activate any default WordPress theme and check if the issue(s) is fixed or not. If it fixes the issues then you can contact your theme provider to update the theme so that it’s compatible with the PHP version you are using.

Step 2

Deactivate all the active plugins then activate them one by one to track which plugin is causing the issue(s). If you are able to track that incompatible plugin then contact the plugin developer to update it so that it’s compatible with the PHP version you are using.

Step 3

If there’s still any issue then you can hire a WordPress developer to help you fixing the issue(s).

In this blog post, we have tried to summarize the important things to consider before and after updating PHP version for WordPress website. If we have missed an important thing, then please mention it in the comments section.

Leave a Comment

Your email address will not be published. Required fields are marked *