How to Update PHP Version in WordPress

Abhishek padhi
2 min readDec 20, 2022

--

To update the PHP version in WordPress, you will need to follow these steps:

1. Check the current PHP version:

Log in to your WordPress dashboard.
Click on the “Tools” menu in the left-hand side panel.
Click on the “Site Health” submenu.
In the “Info” tab, scroll down to the “Server” section and look for the “PHP version” field.

2. Update the PHP version on your hosting account:

Contact your hosting provider and ask them to update the PHP version to the latest stable version. Some hosting providers may have a control panel or a one-click option to update PHP.

Alternatively, if you have access to the server via FTP or SSH, you can update the PHP version yourself. Make sure to back up your site before making any changes to the server.

You can watch the below to know the step-by-step process of updating the PHP version in Hostinger, and Bluehost Hosting using the Cpanel.

Update the PHP version in WordPress:

Once the PHP version has been updated on the server, log in to your WordPress dashboard.
Click on the “Tools” menu in the left-hand side panel.
Click on the “Site Health” submenu.
In the “Info” tab, scroll down to the “PHP version” field. If the PHP version has been successfully updated, it should reflect the new version.

Test the site to ensure everything is working correctly:

After updating the PHP version, it’s important to test your site to ensure that everything is working correctly. You may need to update some plugins or themes if they are not compatible with the new PHP version.

Update the PHP version in WordPress configuration files (optional):

If your site is using a custom PHP version, you can specify it in the WordPress configuration files. To do this, you will need to add the following line to your wp-config.php file:

define('WP_PHP_BASIC_CAPABILITY', '7.4');

This will ensure that WordPress only loads plugins and themes that are compatible with PHP version 7.4 or higher. Make sure to replace 7.4 with the version of PHP you want to use.

--

--

Abhishek padhi
Abhishek padhi

Written by Abhishek padhi

I am a professional Blogger & content writer. I Mostly write about Blogging and SEO tips. You can find me On key2Blogging.com

No responses yet