Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Update Your PHP Version in WordPress (the RIGHT Way)

Do you want to update the PHP version of your WordPress site?

Using the latest version of PHP in WordPress can significantly improve your site’s performance and user experience. Many web hosting providers make the update process rather easy, but you may need to check several things before doing it.

In this article, we will show you how to easily update the PHP version of your WordPress website.

How to Update Your PHP Version in WordPress (the RIGHT Way)

Why Update PHP Version in WordPress?

Updating your WordPress website’s PHP version can boost your site’s performance.

You see, WordPress is developed using an open-source programming language called PHP. At the time of writing this article, it requires at least PHP 7.4 or greater.

New PHP versions usually come with patches for security vulnerabilities and bugs, protecting your site against malware and hackers. It also includes new features to make running processes much faster and reduce memory usage.

Because of this, we strongly recommend updating your WordPress to the latest stable version of PHP. At the time of writing this article, that is PHP 8.3.2.

If you use an older PHP version, your website may be less secure, slower, and prone to errors due to compatibility issues with WordPress core, plugin, or theme. You can learn more about this topic in our article about how PHP updates by your web host impact WordPress.

Thankfully, most WordPress hosting companies strive to offer the newest PHP versions to meet WordPress’ requirements. They may also automatically update PHP behind-the-scenes and you may not notice any change.

That said, we suggest keeping up-to-date with the latest PHP news. Check what kind of features or changes may affect your WordPress website. A plugin, theme, or software may not work after the update and you have to switch back to an older version of PHP in the meantime.

With that in mind, let’s look at how you can check your current PHP version in WordPress. We will also show you a step-by-step tutorial on how to update your PHP version in different hosting providers.

How to Check Your Current PHP Version in WordPress

WordPress makes it easy to check the version of PHP used by your host. What you need to do is log in to your admin dashboard and head to the Tools » Site Health page.

Then, switch to the ‘Info’ tab.

Opening the Info tab inside the Site Health menu in the WordPress admin area

Next, you need to scroll down a little and click to expand the ‘Server’ tab. This section shows your server’s system information, including its PHP version.

As you can see in the screenshot, our demo website uses PHP version 8.1.

Checking your server's PHP version in the WordPress Site Health page

What to Do Before Updating PHP in WordPress

As with any updates, you want to make sure your live site won’t experience any errors before making the changes official. For this reason, you need to do the following before updating your PHP version:

  • Update WordPress core, themes, and plugins – Doing this can ensure they can operate effectively with the new PHP. Must-have WordPress plugins from reputable developers will usually be readily compatible with newer versions of PHP.
  • Back up your website – Use a backup plugin like Duplicator to create a website backup in case of issues. You can easily restore your site to an error-free version if disaster strikes.
  • Create a staging site – We recommend trying to update your PHP in a staging environment so that any errors caused by the new PHP version won’t affect your live site.
  • Use the PHP Compatibility Checker plugin – Created by WP Engine, this plugin can identify potential issues that may come up from the new PHP version.

How to Update Your PHP Version in Bluehost

First, you need to log in to your Bluehost hosting account’s control panel and click on the ‘Websites’ tab in the left column.

After that, select the website whose PHP version you’d like to update, and click the ‘Settings’ button.

Bluehost site settings

Now, go ahead and switch to the ‘Settings’ tab.

This is where you can see and configure the advanced settings of your WordPress blog or website.

Opening the Settings tab inside the Websites menu in Bluehost

What you need to do now is scroll down to the PHP Version section.

After that, click ‘Change’ next to your current PHP version.

Clicking the Change button in Bluehost to update a website's PHP version

Now, go ahead and select the PHP version you want to update to. Then, simply click the ‘Change’ button.

Bluehost will now start using the selected PHP version for your website.

Selecting a PHP version to update to in Bluehost

How to Update Your PHP Version in Hostinger

First, log in to your Hostinger account dashboard and switch to the ‘Websites’ tab.

From here, you need to click the ‘Manage’ button next to the website where you want to change the PHP version.

This will take you to that particular website’s dashboard.

Switching to the Websites tab in Hostinger and clicking the Manage button

Next, locate the ‘PHP Configuration’ tab under the Advanced menu from the left sidebar.

Hostinger will now show you available and supported PHP versions to choose from.

Select the PHP version you want to use and click the ‘Update’ button to save your settings.

Updating PHP version in Hostinger

A popup will appear asking you to confirm your website, blog, or online store’s PHP update.

Simply click ‘Confirm’ to continue.

Confirming a PHP version update in WordPress

How to Update Your PHP Version in SiteGround

If you are using SiteGround, then here is how you will update the PHP version of your WordPress website.

First, you need to log in to your SiteGround account dashboard.

After that, go to the ‘My websites and services’ section and click the ‘Manage’ button inside Websites.

Clicking the Manage button inside the SiteGround control panel

You will now arrive at the My Websites page.

Just click on the ‘Site Tools’ button under the website you want to update the PHP version in.

Clicking on Site Tools inside the SiteGround control panel

Next, you need to select the ‘PHP Manager’ menu inside the ‘Devs’ section from the left column.

From here, you can scroll down to the PHP Version tab and click the pencil button next to your PHP version.

Opening SiteGround's PHP Manager and clicking the pencil button there

This will bring up a popup. You first need to select ‘Change PHP version manually’ under the ‘Set PHP Version’ option.

After that, you will be able to select your PHP version from a dropdown menu.

Don’t forget to click on the ‘Confirm’ button to apply your changes.

Changing the PHP version in SiteGround

How to Update Your PHP Version in HostGator

What you need to do first is log in to your HostGator hosting account dashboard and click on the ‘Websites’ section.

After that, click the ‘Settings’ button on the website whose PHP version you want to update.

Opening the Websites tab in HostGator and clicking the Settings button

Next, simply switch to the ‘Settings’ tab.

In this section, you can manage your website’s advanced settings.

Opening the Settings section in HostGator

At this stage, just scroll down to the PHP Version section.

Then, click ‘Change’ next to your current PHP version.

Clicking the Change button in the PHP Version section inside HostGator

You will see a popup asking you to select the PHP version you want to update to.

Once you’ve made your choice, just click the ‘Change’ button.

Changing the PHP version in HostGator

How to Update Your PHP Version in DreamHost

If you are a DreamHost user, you need to log in to your hosting account’s control panel. After that, navigate to the ‘Manage Websites’ tab from the left-side panel.

On the list of websites, just click the three-dot menu and choose ‘PHP Version.’

Opening the Manage Websites section and clicking PHP Version in DreamHost

You will be directed to the PHP settings page inside the control panel.

Go ahead and choose a PHP version from the dropdown menu. Then, click ‘Change PHP Version’ to continue with the update.

Changing the PHP version in DreamHost

How to Update Your PHP Version in WP Engine

WP Engine is a managed WordPress hosting company, which means they automatically upgrade the PHP version for you. However, you can also manually upgrade and downgrade the PHP version for your websites.

Simply log in to your WP Engine dashboard. On the ‘My Sites’ page, click on the PHP version next to your selected website.

Clicking the PHP number link in WP Engine

This will bring you to your website’s Overview settings. Here, WP Engine has a feature where you can preview your website on the latest PHP version without actually changing the PHP version.

If you want to try it out, go ahead and click ‘Preview PHP …’

The PHP Test Driver feature in WP Engine

To actually update PHP in WP Engine, scroll down to the ‘Updates’ section.

Then, click on the PHP version number link.

Changing the PHP version in WP Engine

Now, just choose the ‘Upgrade to PHP … ‘ option.

After that, click on the ‘Confirm’ button.

Confirming to update the PHP version in WP Engine

How to Update Your PHP Version in Other WordPress Hosting Providers

Most WordPress hosting providers organize their settings in a more or less similar way. You will most likely find the option to change a PHP version in the advanced settings of your cPanel or any other hosting control panel.

If you cannot find it, then you can check your provider’s knowledge base or contact their support team to change the PHP version of your website. For more information, you can check out our article on how to ask for WordPress support.

Changing PHP Versions in WordPress: Frequently Asked Questions

Now that we’ve discussed how to update your PHP version in WordPress, let’s cover some frequently asked questions about the topic.

What should you do after updating the PHP version?

After updating the PHP version for your WordPress website, you may want to ensure that everything is working as expected. We recommend visiting your website to see if there are any immediately noticeable issues.

After that, you can log in to the WordPress admin area of your website. Ensure your website uses the latest version of WordPress and all your plugins and themes are updated.

See our beginner’s guide on how to safely update WordPress for more information.

What do I do if a PHP update breaks my WordPress website?

It is unlikely that a PHP update will break a WordPress site. However, with the abundance of free and premium plugins, there is still a chance that a single line of poor code can result in any of the common WordPress errors.

First, you must ensure it is not a plugin or theme causing this error. To do that, you need to deactivate all your WordPress plugins and switch to a default WordPress theme.

If this does not solve your issue, then contact your web host’s support team. There is a good chance that the issue you are facing will already be on their radar, and they will be able to assist you.

If your web host is unable to help you out, then you can downgrade your PHP version using the methods described above.

We hope this article helped you learn how to update the PHP version of your WordPress site. You may also want to see our list of the fastest WordPress hosting providers on the market or our ultimate WordPress SEO guide to boost your search engine rankings.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

17 CommentsLeave a Reply

  1. Suman Sourabh

    So does that mean that if WordPress is updating to the latest version, PHP doesn’t update its own version? It has to be done manually?

    • WPBeginner Support

      Correct, WordPress does not control your PHP, your hosting provider does.

      Admin

  2. Kzain

    I didn’t update the PHP version until my hosting mentioned that the PHP version is old and my site needs an update it was quite easy following the guide thank you so much. The reminder to back up your website before updating is especially important. Having a recent backup provides peace of mind and allows for easy restoration if any unforeseen issues arise. Outdated plugins or themes can sometimes malfunction after a PHP update and need updates.

  3. Hajjalah

    Thanks for this guide. My blog is hosted on Namecheap shared hosting and not managed WordPress hosting. But I have never updated it because I always find my “php version” updated automatically to the latest version, I do not get any notification about it. How is this possible? Can that break my website? What can I do to fix that?

    • WPBeginner Comments

      This is likely a feature offered by the host.

      If you are concerned a plugin will break, you could reach out to the hosting provider and ask if there is a way to disable PHP automatically updating.

  4. Jiří Vaněk

    I would like to ask if it is safe to switch WordPress to PHP 8.3 and it is already fully ready for it. I read the article so I know how to do it right. I just don’t know if I should choose this version or prefer 8.2.

    • WPBeginner Support

      We would first recommend creating a staging site to test that your theme and plugins would not have an issue if you wanted to update to a new version of PHP. It would depend on the specific site for if it is ready for a newer version of PHP.

      Admin

      • Jiří Vaněk

        Thank you. I followed your advice and backed up the entire website, which I then imported to another server with a new PHP version and tested everything. Apart from a few minor details, everything worked fine. Thank you for the advice, I now feel much safer to proceed with the PHP migration to the new version.

  5. Moinuddin Waheed

    Thanks for the detailed steps for updating php to the latest version.
    This is absolute must for ensuring the optimum safety and security of the website.
    I think the WordPress core is still the php and it is always prudent to have the latest version.
    However, this step should be taken with utmost caution.
    it may break the website or some of the functionality of the website due to incompatibility issues.
    It is advisable to make a complete backup of the website before updating the php version.

  6. Cristian Radescu

    I tried changing from 7.4 to 8.1 and when I do that my website returns a 403 error. Anyone knows why?

  7. Yasir Ahmed Khan

    I did change my php version in c panel but it didnt reflect on my Dashboard it is still 7.3

    • WPBeginner Support

      We would recommend checking with your hosting provider to ensure nothing on their end prevented the update or that a confirmation is not needed before they update your php.

      Admin

  8. Mornay

    What do you do if the MultiPHP software is not available on cPanel? Like in my case. What is the RIGHT way then?

    • WPBeginner Support

      IT would depend on your specific hosting provider, we cover multiple hosts in this list and if your hosting provider is not included and does not use one of the methods from the hosts above, we would recommend reaching out to their support and they should be able to assist.

      Admin

  9. Raaz

    Thanks for this wonderful article. What is the difference between changing the php verion from above method and using htaccess. Will there be any effect in the site and its performance ?

  10. Fahad

    Great Article, I just updated the PhP version my entire site went down, and that is because most of the plugins and page builder doesn’t support the newer version of PhP, so I went back to the older version, just wanted to say that, Thanks

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.