WordPress: How to Check and Update the PHP Version

Blogging on a WordPress website is a great way to share information and make your business visible. However, you may want to know your WordPress website’s PHP version. This may be important to keep it performing at its best. PHP, the scripting language that powers WordPress, is what makes your website function and protects it from intrusions.

WordPress: How to Check and Update the PHP Version

This guide will tell you how to check your PHP version in WordPress and how to update it easily.

How to Check Your WordPress PHP Version

From WordPress Dashboard

The easiest way to check the PHP version is through the WordPress dashboard.

  1. Go to your WordPress dashboard.
  2. Select Tools and then Site Health.
  3. Click the Info tab.
    Opening WordPress site health info
  4. You should see your PHP version under Server.
    Viewing PHP version

This method is straightforward and doesn’t require technical skills. It displays the PHP version and other helpful site health information at a glance.

After knowing the PHP version, you might want to learn how to change your WordPress username.

Using the PHP Info File

If you are tech-savvy, creating a PHP info file is another way to check your WordPress PHP version. Follow these steps to use the file:

  1. Create a new file in Notepad (or a similar text editor) and name it phpinfo.php.
  2. Add this code: <?php phpinfo(); ?> and save it.
  3. Upload it to your web server with an FTP (File Transfer Protocol) client.
  4. Access the file via your browser (http://yourdomain.com/phpinfo.php).

The open page will display the PHP version and other PHP configuration info. After checking your PHP version, delete this file so you won’t have to worry about unwanted eyes prying into it.

Via Hosting Control Panel

Most hosting providers also have a control panel (such as cPanel) where you can find the PHP version used by your WordPress installation. The specific steps will vary with the hosting provider. Here are the general steps:

  1. Log in to your hosting account.
  2. Look for sections like Software, PHP Version Manager, or Settings & Packages.
  3. Click Packages and view or manage your PHP version.
    Viewing php version on host

This method requires you to access your WordPress host and is slightly more technical, but it gives you more control, especially if you’re considering an upgrade.

How to Update the PHP Version

If your WordPress PHP version is outdated, you may want to update it to prevent security breaches. To do so, you will have to log into your host’s CPanel account. The specific steps will depend on your host; however, the steps below should be similar. 

  1. Log in to your hosting account.
  2. Look for sections like Software, PHP Version Manager, or Settings & Packages.
  3. Click Packages, click the Modify button, and select your preferred PHP version.
    Modifying the PHP version of your WordPress

Staying Ahead With PHP Versions

A WordPress website’s health hinges on keeping up with PHP updates. Being up-to-date protects your site from bad actors and helps it perform better. So check it regularly and update it following the steps we outlined when a new version pops up.

Next, you might want to learn how to embed Google Maps into your WordPress site.

FAQs

Q: Can I update my WordPress PHP version, or must my host do it?

A: If you have a shared hosting plan, the host may manage your PHP updates; however, you will always have the choice to update them yourself.

Q: Is there a risk of using an outdated PHP for WordPress?

A: Yes. An outdated PHP opens you to security attacks like cross-site scripting (XSS) and SQL injection. It also affects performance, causing slower load times and increased resource usage.

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.