🌐
WP Rocket
wp-rocket.me › home › blog › page speed and caching › how to check and update your wordpress php version easily
How to Check and Update Your WordPress PHP Version Easily
December 10, 2024 - There are 3 easy ways to determine which PHP version is your WordPress site running on: check directly from your WordPress dashboard, access it via your hosting provider’s cPanel, or create a separate PHP info file.
🌐
WP Buffs
wpbuffs.com › wordpress-php-version-check
How to Check Your WordPress PHP Version (3 Methods)
Learn three simple methods you can use for checking which version of PHP your WordPress site is using.
Published   September 16, 2024
People also ask

Which PHP version is compatible with WordPress?

The minimum PHP version that is compatible with WordPress is PHP 5.2.6. Although your host may offer this as an option, it’s not necessarily the best or safest. Other PHP versions compatible with WordPress are PHP 5.3 – 5.6 and PHP 7 and higher. WordPress recommends using PHP 7.4.

🌐
wpbuffs.com
wpbuffs.com › wordpress-php-version-check
How to Check Your WordPress PHP Version (3 Methods)
How do I know if PHP is working?

If you visit your WordPress site and everything appears to be functioning and displaying as it should, your PHP is likely working. However, if there are any issues or an update is required, you can find them listed under the Site Health tool from your WordPress dashboard.

Also, to ensure a PHP version works with your site, it’s important to check the PHP compatibility of your themes and plugins. For this, you may want to use a plugin such as PHP Compatibility Checker. Once installed, it will display errors and warnings related to your PHP version and WordPress compatibility. However, as we mentioned earlier, this plugin hasn’t been tested with the latest versions of WordPress.

🌐
wpbuffs.com
wpbuffs.com › wordpress-php-version-check
How to Check Your WordPress PHP Version (3 Methods)
🌐
weDevs
wedevs.com › blog › 409582 › how-to-update-php-version
How to Safely Update PHP Version in WordPress Without Breaking It - weDevs
August 11, 2025 - After clicking on the option, it takes you to a new page. It shows you the PHP version your WordPress site is running on. Alternatively, you can install a WordPress plugin to check the PHP version.
🌐
CyberOptik
cyberoptik.net › kb › check-your-php-version-in-wordpress
How To Check Your PHP Version in WordPress | CyberOptik
Our article provides easy-to-follow steps and two ways for determining your PHP version in WordPress.
🌐
Fixmysite
fixmysite.com › / › how to check php version in wordpress: a step-by-step guide
How to Check PHP Version in WordPress: A Step-by-Step Guide
November 3, 2025 - ... Go to your dashboard and navigate to Tools → Site Health → Info → Server. The PHP version appears under server information along with other technical details about your hosting environment.
🌐
WordPress
developer.wordpress.org › reference › functions › wp_check_php_version
wp_check_php_version() – Function | Developer.WordPress.org
Whether the PHP version is still acceptable or warnings should be shown and an update recommended. function wp_check_php_version() { $version = PHP_VERSION; $key = md5( $version ); $response = get_site_transient( 'php_check_' .
🌐
WordPress
learn.wordpress.org › lesson › testing-your-products-for-php-version-compatibility
Testing your products for PHP version compatibility | Learn WordPress
March 17, 2025 - Setting up this environment can be done in a few ways, but the most common option would be to use a local development environment that supports changing PHP version, such as Mamp, Laragon, LocalWP, and DevKinsta. For the purposes of this example we’ll test on PHP 8.1. A quick way to check that you’re on the right version, is you create an info.php file in the root of your WordPress install, and use the following code:
Find elsewhere
🌐
Jetpack
jetpack.com › home › security › how to check and update your wordpress php version
How to Check and Update Your WordPress PHP Version
June 28, 2025 - Then we’ll show you how to safely check, update, and upgrade your PHP version on three different web hosts. Code is the basis for every single website. The exact programming language may vary between systems, but one thing is certain: it’s absolutely critical to the proper functioning of a site. For WordPress, that essential technology is PHP.
🌐
WP Engine
wpengine.com › home › resources › how to check which version of php you’re using
How to Check Which Version of PHP You're Using
September 28, 2024 - While the Site Health Status page ... which version of PHP you’re using by navigating to the Tools > Site Health > Info page in the WordPress dashboard and opening the Server tab....
🌐
Reddit
reddit.com › r/wordpress › how to check php compatibility?
How to check PHP compatibility? : r/Wordpress
August 25, 2025 - I would recommend switching to PHP 8.3 or even PHP 8.2. From the WordPress PHP versions Compatibility page you can see that WP is only beta-compatible with PHP 8.4. ... Make a backup. Enable WP_DEBUG, WP_DEBUG_LOG in your wp-config.php. Switch the PHP version. Check if there are any errors ...
🌐
Storylane
storylane.io › tutorials › how-to-check-php-version-wordpress
How to Check PHP Version WordPress: 1-Min Guide
Login to your WordPress account. ... Select the "Info" button. ... You will find the "PHP version" here.
🌐
WP Bullet Guides
guides.wp-bullet.com › home › checking the current wordpress version via command line with(out) wp-cli
Checking the Current WordPress Version via Command Line with(out) WP-CLI •
February 2, 2024 - grep wp_version wp-includes/version.php | awk -F "'" '{print $2}' Now you will get cleaner output showing just the version number ... This is by far the easiest method but in case you don’t have grep here are some alternatives. The simplest way to check the WordPress core version with WP-CLI is to use the core version command
🌐
Wpmet
wpmet.com › check-and-update-php-version-in-wordpress
How to Check and Update PHP Version in WordPress Website
January 12, 2025 - A lot of you must be unsure of the PHP version you’re using, right? Well, if you’re running WordPress 5.0 or higher then you can simply check the PHP version on the WordPress website.
Price   $$$
Address   2nd Floor, Amigo 14 Square, House No: 59/C-61/C, 2A Asad Ave, Dhaka, 1207
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to check php version
How to Check PHP Version | phoenixNAP KB
December 9, 2025 - Depending on the plugin you install, the PHP version might be displayed in different locations within the WordPress dashboard. ... The At a Glance section on the Dashboard. The WP-ServerInfo section. The Site Health section / Info tab. A new menu item, such as Query Monitor. For this tutorial, we used Display PHP Version, which shows the PHP version in the At a Glance section on the Dashboard: ... This article showed the common ways to check the PHP version on your server, local machine, or WordPress website.
🌐
WordPress
wordpress.org › support › update-php
Get a faster, more secure website: update your PHP today – WordPress.org Forums
June 19, 2025 - The next section will show you how to do this. To check what version of PHP your WordPress site is using, from the WordPress Dashboard, select Tools > Site Health from the sidebar menu, and then select the Info tab.
🌐
dotlinux
dotlinux.net › blog › how-to-check-php-version-on-ubuntu
How to Check PHP Version on Ubuntu: A Comprehensive Guide
You’ll see a detailed PHP info page. The PHP Version is prominently displayed at the top (e.g., 8.1.2). The phpinfo.php file exposes sensitive server details (e.g., database credentials, paths). Delete it after checking: ... Ubuntu uses dpkg (Debian Package Manager) to track installed software.
Top answer
1 of 4
21

On a system where

  • you can't change the /usr/bin/php symlink
  • you can't change the PATH to point to a different version (because the php executables don't reside in distinct /lib/ directories)
  • WP_CLI_PHP has no effect

(like my Arch Linux with php(8), php7 installed from extra and wp-cli installed from AUR. I'm using php7 vs php8 here, but this should work for any versions.)

…a workaround may be to call the wp phar executable with php7 cli:

whereis wp
# /usr/bin/wp

php7 /usr/bin/wp cli info
# PHP binary:     /usr/bin/php7
# PHP version:    7.4.25

for convenience you can add a bash alias in your .bashrc:

alias wp-php7='php7 /usr/bin/wp'
# or override wp altogether
alias wp='php7 /usr/bin/wp'
2 of 4
13

Got the same problem! Just switch the php version. On my server PHP5.6 was default for apache, while CLI was configured with PHP7.1. After installing WP-CLI, with wp --info I got this result:

PHP binary: /usr/bin/php7.1
PHP version: 7.1.5-1+deb.sury.org~xenial+1
php.ini used: /etc/php/7.1/cli/php.ini
WP-CLI root dir: phar://wp-cli.phar

And when i used the wp core install command i got the error: Your PHP installation appears to be missing the MySQL extension which is required by WordPress. The problem is just the mix between the different versions: we have just to switch completely to 5.6 or 7.1. In my case problem was solved simply by writing on the shell:

sudo update-alternatives --set php /usr/bin/php5.6

And then wp --info

PHP binary: /usr/bin/php5.6
PHP version: 5.6.30-10+deb.sury.org~xenial+2
php.ini used: /etc/php/5.6/cli/php.ini
WP-CLI root dir: phar://wp-cli.phar

Problem solved! WP-CLI worked like a charm.