Looking to update your PHP in WordPress? Using the latest PHP version can improve your site’s performance and security. While some web hosts manage the update for you, otherwise require you to push the change on your own.
In this article, we’ll walk you through the process of updating the PHP version of your WordPress website.
Table of Contents
Why Update Your PHP in WordPress?
Updating your PHP version can speed up your WordPress site and help keep it safe.
WordPress runs on an open-source programming language called PHP. It needs at least PHP 7.4 to work properly, though 8.0 is recommended. Right now, the latest version available is PHP 8.3.2.
New PHP versions fix bugs and patch security holes. They also help your site run faster and use less memory. That means a smoother experience for you and your visitors.
If you’re using an old version of PHP, your site might be slower. It might also be easier for hackers to break into. You might have compatibility issues with WordPress core, themes, or plugins as well.
We recommend updating to the latest stable version of PHP. Many hosting providers already do this for you. In some cases, they update it in the background so you don’t even notice.
Even so, it’s a good idea to check which PHP version your site is using. Some updates might break a plugin or theme. If that happens, you might need to go back to an earlier version until the problem is fixed.
How to Check Your Current PHP in WordPress
Before you update your PHP in WordPress, you shoudl check which version you’re on currently. You can do it right in your WordPress dashboard.
After logging into WordPress, visit Tools > Site Health.

Switch to the Info page.

Scroll down the list of items and open the Server tab.

This section shows the system information of your server, including the PHP version. In this example, the host is using PHP version 7.4.33.

What to Do Before Updating Your PHP in WordPress
Before you update your PHP in WordPress, it’s important to take a few precautions to make sure your site doesn’t break.
- Back up your website and database. You can use a plugin like UpdraftPlus, Jetpack, or BlogVault to create and store backups easily.
- Update WordPress core, themes, and plugins. Developers often release updates to make their code compatible with newer PHP versions.
- Use a plugin like PHP Compatibility Checker to scan your themes and plugins for issues with the PHP version you want to upgrade to. This helps catch problems before they happen.
- Create a staging site. A staging site is a copy of your website where you can safely test the PHP update without affecting your live site. Your host may offer this feature. You can also use a staging site plugin like WP Staging, All-in-One WP Migration, or Duplicator.
Once you’ve done all the prep work, go ahead and update PHP to the latest supported version. Afterward, test your site thoroughly. Check the homepage, blog posts, forms, and admin area.
How to Update Your PHP in WordPress cPanel
For the purposes of this tutorial, we’ll show you how to update your PHP in SupportHost. The process is similar for any host that uses cPanel.
If the PHP version selector isn’t in an obvious place, check your host’s knowledge base or contact their support team.
Keep in mind that not all hosts allow you to update your PHP in WordPress (or change versions at all). If PHP control is important to you, choose a host that offers that option.
From your SupportHost dashboard, click Log in to cPanel.

In cPanel, scroll down to Software and click Select PHP Version.

On the PHP Selector page, click the drop-down menu next to the Current PHP version and choose the version you want.

Then click the Apply button that appears.

On the Extensions tab, you can activate or deactivate different PHP modules. These are compiled modules that extend the functionality of your PHP. You’ll notice that some are active and others are available to activate. If a theme or plugin requires you to activate something, this is where you’ll find it.

In the Options tab, you can manage several PHP parameters. For example, you can change the memory limit or set a maximum limit for uploaded files. This is also where you can enable the display_errors option to display PHP errors on the screen.

Update Your PHP Using the MultiPHP Manager
If you want to update your PHP in WordPress for each domain on your account (or subdomains), you’ll need to use the MultiPHP Manager. If you set up a staging site to test PHP versions, this is where you’ll find it.
In your cPanel, click MultiPHP Manager in the Software section.

In the MultiPHP Manager, you’ll see a list of domains and subdomains associated with your account. Check the box next to the domain or subdomain with the PHP version you want to change

Next, select your desired PHP version from the drop-down menu on the right and click Apply.

Update Your PHP Using .htaccess
In some cases, you may need to update your PHP in WordPress at the folder level. For instance, you might need this if you need to use a specific script that requires a different PHP version than the rest of your site. You can do this in the .htaccess file.
First, access the folder you need to change. You can do this from the cPanel file manager or by connecting via FTP.
The .htaccess file is not visible by default. To see hidden files, you’ll need to modify the folder settings. Click on Settings at the top right of the cPanel and then check the item Show hidden files (dotfiles).

If there is no .htaccess file inside the folder, you’ll need to create one. To do this, click on File and type “.htaccess” (with the period). Then click Create New File.

To edit the .htaccess file, right-click it and select Edit.
The file editor is where you can enter these instructions to set a specific PHP version. In our example, we set the PHP 5.4 version in a single folder by adding this code in the .htaccess file:
<IfModule mime_module>
AddHandler application/x-httpd-alt-php54 .php .php5 .phtml
</IfModule>
You can use this method for any PHP version you want to use. Change the middle line to one of these according to the version you want to use.
PHP Version | .htaccess Code |
---|---|
PHP 4.4 | AddHandler application/x-httpd-alt-php44 .php .php4 .phtml |
PHP 5.1 | AddHandler application/x-httpd-alt-php51 .php .php5 .phtml |
PHP 5.2 | AddHandler application/x-httpd-alt-php52 .php .php5 .phtml |
PHP 5.3 | AddHandler application/x-httpd-alt-php53 .php .php5 .phtml |
PHP 5.4 | AddHandler application/x-httpd-alt-php54 .php .php5 .phtml |
PHP 5.5 | AddHandler application/x-httpd-alt-php55 .php .php5 .phtml |
PHP 5.6 | AddHandler application/x-httpd-alt-php56 .php .php5 .phtml |
PHP 7.0 | AddHandler application/x-httpd-alt-php70 .php .php7 .phtml |
PHP 7.1 | AddHandler application/x-httpd-alt-php71 .php .php7 .phtml |
PHP 7.2 | AddHandler application/x-httpd-alt-php72 .php .php7 .phtml |
PHP 7.3 | AddHandler application/x-httpd-alt-php73 .php .php7 .phtml |
PHP 7.4 | AddHandler application/x-httpd-alt-php74 .php .php7 .phtml |
PHP 8.0 | AddHandler application/x-httpd-alt-php80 .php .php8 .phtml |
PHP 8.01 | AddHandler application/x-httpd-alt-php81 .php .php8 .phtml |
Test Your Site, Plugins, and Theme
After you update your PHP in WordPress, your next step is to browse your website to see if you notice any errors.
If something is incompatible, you might see a blank white screen. In some cases, the browser will show you a 500 error (501, 502, 503, 504, etc.).
In these cases, the issue is most likely a conflict with one of your plugins. Visit Plugins > Installed plugins and select every plugin on the list. Then select Deactivate from the drop down menu.

If the problem is gone, you know a plugin was the culprit. Then re-enable your plugins one at a time to identify the one that’s causing the conflict.
If the issue persists, do the same for your theme. Switch to a different theme (such as a default WordPress theme) and check for the problem. If the problem disappears, you know it’s a theme conflict.
Update Your PHP is WordPress FAQs
What should you do after you update your PHP in WordPress?
Check your website carefully. Visit different pages, test your forms, and make sure everything loads correctly. Also check your plugins and themes to confirm they still work as expected.
What do I do if a PHP update breaks my WordPress website?
First, restore your site from the backup you made before the update. Then, switch to a compatible PHP version or disable any plugin or theme that caused the problem. You can also ask your web host for help.
Is WordPress leaving PHP?
No. WordPress is still built on PHP and has no plans to move away from it.
Can I use WordPress without PHP?
No. WordPress runs on PHP. It needs a server that supports PHP in order to work.
Is WordPress still written in PHP?
Yes. The core of WordPress is still written in PHP, along with HTML, CSS, and JavaScript.
Should I upgrade my PHP version?
Yes. Newer PHP versions are faster, more secure, and supported by WordPress. Just be sure to back up your site and check for compatibility before upgrading.
What is the best PHP version for WordPress?
The best version is the latest one supported by both WordPress and your plugins/themes. As of now, PHP 8.1 or 8.2 is recommended for most sites.
How do I check my site’s PHP compatibility?
You can use a free plugin like PHP Compatibility Checker or test your site on a staging environment running the newer PHP version to look for issues.
Leave a Reply