Title: WordPress reading old PHP version, server running current version
Last modified: April 29, 2025

---

# WordPress reading old PHP version, server running current version

 *  [exitoffroad](https://wordpress.org/support/users/exitoffroad/)
 * (@exitoffroad)
 * [1 year ago](https://wordpress.org/support/topic/wordpress-reading-old-php-version-server-running-current-version/)
 * After several days of trying to figure out why my site health was showing my 
   server as PHP 7.4.33, yet my hosting server was running 8.3.6, and hours on chat
   with my host Bluehost (they were useless in helping), I finally figured out the
   issue with the help of ChatGPT.
 * My regular htaccess file in my public.html was set correctly to use PHP 8.3. 
   My host was insistent that my server was using 8.3, which it actually was. WordPress
   was showing that I’m using 7.4.33, no matter what updates we did on the server
   side. 3 different people could not figure out what I was trying to show them.
 * I found this other thread here: [https://wordpress.org/support/topic/wordpress-thinks-my-php-is-older-version/page/2/](https://wordpress.org/support/topic/wordpress-thinks-my-php-is-older-version/page/2/)
   and also [https://wordpress.org/support/topic/wordpress-says-i-need-to-update-my-php-but-its-at-8-1/](https://wordpress.org/support/topic/wordpress-says-i-need-to-update-my-php-but-its-at-8-1/)
 * I wish I could open them and post this reply, but I can’t. He figured out it 
   was a plugin issue, but I just found this out:
 * There’s an additional htaccess file under public.html > wp-admin
 * This was overriding the other htaccess file one level below. That one I just 
   found was still pointed at PHP 7, so I updated the file to 8.3 and it’s all working
   correctly on my site now. No idea why it didn’t update itself, but maybe WordPress
   needs to do something about that? Like check the server config and update WordPress
   when it does an update to match the PHP version? Maybe a different plugin is 
   somehow causing wordpress to use an old version of PHP?
 * Hope this helps others in the future.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [1 year ago](https://wordpress.org/support/topic/wordpress-reading-old-php-version-server-running-current-version/#post-18440686)
 * Hi [@exitoffroad](https://wordpress.org/support/users/exitoffroad/)
 * I hope you are doing well and thank you for sharing that.
 * I checked the WordPress wp_check_php_version() function and it uses the PHP_VERSION
   [https://www.php.net/manual/en/reserved.constants.php#constant.php-version](https://www.php.net/manual/en/reserved.constants.php#constant.php-version)
   so if the htaccess in wp-admin is messing with the PHP it would make sense the
   WordPress sees the wrong version, as the native constant would be returning the
   PHP for that directory.
 * As for improvement, to be honest I don’t see it as a bug but that would be my
   view, you may have a look at [https://make.wordpress.org/core/handbook/testing/reporting-bugs/](https://make.wordpress.org/core/handbook/testing/reporting-bugs/)
   in case you would like to report that.
 * Best Regards
    Patrick Freitas
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 year ago](https://wordpress.org/support/topic/wordpress-reading-old-php-version-server-running-current-version/#post-18440736)
 * I would also like to add: WordPress itself does not set `.htaccess` in the `wp-
   admin` directory. It must have been put there by a plugin of yours or by your
   hoster.
 *  [DavidB722](https://wordpress.org/support/users/davidb722/)
 * (@davidb722)
 * [9 months, 2 weeks ago](https://wordpress.org/support/topic/wordpress-reading-old-php-version-server-running-current-version/#post-18594801)
 * Adding some more info here as to possible causes of this. I encountered this 
   issue after updating PHP from 8.0 to 8.3 on Ubuntu, but no additional .htaccess
   files were present. WordPress was still insisting that it was running PHP 8.0.
   In my case, apache was running a different PHP version than Ubuntu. The solution
   in my case was to install the correct module for apache:
 * `sudo``apt install libapache2-mod-php8.3`
 * `sudo a2enmod php8.3`
 * `sudo systemctl restart apache2`
 * Hope that’s useful info in case someone else encounters the same issue.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPress reading old PHP version, server running current version’ is
closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [php upgrade](https://wordpress.org/support/topic-tag/php-upgrade/)
 * [update.php](https://wordpress.org/support/topic-tag/update-php/)
 * [WordPress update](https://wordpress.org/support/topic-tag/wordpress-update/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 4 participants
 * Last reply from: [DavidB722](https://wordpress.org/support/users/davidb722/)
 * Last activity: [9 months, 2 weeks ago](https://wordpress.org/support/topic/wordpress-reading-old-php-version-server-running-current-version/#post-18594801)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
