Title: php version in WP differs from server installed version
Last modified: November 20, 2023

---

# php version in WP differs from server installed version

 *  [cliffg1821](https://wordpress.org/support/users/cliffg1821/)
 * (@cliffg1821)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/)
 * I have been getting a warning that the installed php is 7.3.33 and not up to 
   date. In the hosting (TSOhost) server cPanel I have changed the version to 7.4
   and this is showing correctly on their pages as the currently installed version,
   but I am still getting the warning on teh WP dashboard. The start of the .htaccess
   file reads as follow (this help site has reformatted the text and taken out some
   presumably unpermitted stuff such as returns and angle brackets) but roughly:
 * —–
 * Options +Indexes
   IndexIgnoreReset ONIndexIgnore cgi-binIndexOptions SuppressColumnSorting
 * **AddHandler application/x-httpd-alt-php74___lsphp .php **
 * #Block WordPress xmlrpc.php requests
 * Files xmlrpc.php order deny,allow deny from all /files order deny,allow deny 
   from all
   SuPHP_ConfigPath /home/kv03h09vouj7/public_html/php.ini
 * RewriteEngine On RewriteBase / RewriteRule ^index.php$ – [L] RewriteCond %{REQUEST_FILENAME}!-
   f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]
   **AddHandler
   application/x-httpd-alt-php73___lsphp .php **
 * #BEGIN WordPress……
 * —–
 * So I have both the old and new php versions have Addhandler lines. Is it the 
   order in which these are loaded? Should there only be the one (74)? Anything 
   else I’m not aware of? Thanks
 * (and is there any way to get a plain text editor here?!)

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

 *  [WP Provider](https://wordpress.org/support/users/wpprovider/)
 * (@wpprovider)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/#post-17215566)
 * Hi Cliff,
 * The warning about the PHP version in your WordPress dashboard not being up to
   date might stem from conflicting directives in your .htaccess file. Consider 
   the following steps:
    1. Check the .htaccess File: Remove the PHP 7.3 AddHandler line if you’ve upgraded
       to PHP 7.4. If you use a controlpanel like Directadmin, Plesk or cPanel you 
       often have the option to use a PHP Selector, this would be enough to change 
       your PHP version so that you don’t have to use the AddHandler in the .htaccess
 * 2. Correct Order of AddHandler: Place the PHP 7.4 AddHandler directive before
   the PHP 7.3 one to prioritize the newer PHP version. In cPanel you can use the
   PHP Selector option which will eliminate the need for AddHandler in the .htaccess.
 * 3. Remove Redundant Lines: Review lines related to SuPHP_ConfigPath and php.ini
   for necessity in your server configuration. Remove or adjust if unnecessary.
 * 4. WordPress Compatibility: Ensure your WordPress version and installed plugins
   are compatible with PHP 7.4, as older plugins or themes may lack full support
   for the latest PHP versions.
 * After changes, clear the WordPress cache to update any cached information reflecting
   the old PHP version.
   Ps. in [your profile](https://wordpress.org/support/users/cliffg1821/edit/)
   on the bottom you can switch the editor if you want that.Good luck!
 *  Thread Starter [cliffg1821](https://wordpress.org/support/users/cliffg1821/)
 * (@cliffg1821)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/#post-17215975)
 * Double thanks.
 * Commenting out the 7.3 .htaccess line worked straight away. The site also worked
   fine after also commenting out 7.4 line. I’ve left these both commented out for
   now.
 * My hoster cPanel does have PHP Selector, which is how I (thought I had) changed
   the php version. Having found the .htaccess php 73 and 74 lines apparently did
   nothing, and with your comment that PHP Selector should work without needing 
   an .htaccess entry, I changed the php to 8.0 (using PHP Selector) and the site
   didn’t work at all. I went back to 7.4 and all ok again. I’m happy to leave at
   7.4, but for future reference I wouldn’t mind knowing why PHP Selector seemed
   to fail to change to 8.0.
 * [Re the editor, thanks.]
    -  This reply was modified 2 years, 6 months ago by [cliffg1821](https://wordpress.org/support/users/cliffg1821/).
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/#post-17216824)
 * Support for PHP 7.4 expired almost a year ago. It would therefore be advisable
   to upgrade the project to PHP 8.0 or newer.
 * Your hoster’s error log should tell you why the switch to PHP 8.0 is causing 
   an error. If it is due to a plugin or theme you are using, you will need to update
   it before the changeover. If the error is due to the hosting, you should contact
   their support.
 *  [WP Provider](https://wordpress.org/support/users/wpprovider/)
 * (@wpprovider)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/#post-17217297)
 * It is not always possible to change directly to newer PHP versions for example,
   custom plug-ins are written for an older PHP version or plug-in developers have
   not yet rewritten their plug-in for the latest PHP version. Therefore a lot of
   hosters are using HardenedPHP for supporting older versions of PHP without compromising
   security. This makes it for the end-user easier to solve the issues in the meanwhile
   on a dev environment for example.
 *  Thread Starter [cliffg1821](https://wordpress.org/support/users/cliffg1821/)
 * (@cliffg1821)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/#post-17218065)
 * Thanks both. Aware that 8.0 or even 8.1 would be better.
 * The chance of getting sense out of my hoster for the subject site re. error logs
   is nil.
 * However, I have two very similar sites, one of them on a decent hoster, so I 
   shall try and migrate that to 8.0 first, as their support is excellent (Clook).
 * Thanks again for all the help
 *  Thread Starter [cliffg1821](https://wordpress.org/support/users/cliffg1821/)
 * (@cliffg1821)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/#post-17218093)
 * The other site changed to php 8.0 using MultiPHP Manager with the simple tick
   of a box (having done the compatibility checks earlier) 🙂
 *  [WP Provider](https://wordpress.org/support/users/wpprovider/)
 * (@wpprovider)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/#post-17218096)
 * Great to hear that it’s solved!
 *  Thread Starter [cliffg1821](https://wordpress.org/support/users/cliffg1821/)
 * (@cliffg1821)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/#post-17218108)
 * If only the other hoster could be solved…
 *  [WP Provider](https://wordpress.org/support/users/wpprovider/)
 * (@wpprovider)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/#post-17218115)
 * Unfortunately that is not something we can do for you. My advice would be to 
   get in touch with them to discuss it.
 *  [lbdesign](https://wordpress.org/support/users/lbdesign/)
 * (@lbdesign)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/#post-17279205)
 * Oh gosh [@wpprovider](https://wordpress.org/support/users/wpprovider/). Thank
   you! I had the same problem, and commenting out the .htaccess PHP 7.3 handler
   line also fixed it for me.
 * My PHP was set correctly at 8.0 at the server. But this line in .htaccess was
   confusing the wordpress installation.

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

The topic ‘php version in WP differs from server installed version’ is closed to
new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 4 participants
 * Last reply from: [lbdesign](https://wordpress.org/support/users/lbdesign/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/php-version-in-wp-differs-from-server-installed-version/#post-17279205)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
