The website hosting uses PHP version 8.4, but the WordPress admin panel says it uses PHP 7.4.
1. Fix the Overridden .htaccess File
If you are using a hosting panel like cPanel, changing the PHP version often fails to overwrite old code blocks hidden inside your root configuration file.
- Log into your hosting account and open the File Manager.
- Navigate to your site’s root folder (usually public_html).
- Reveal hidden files (Click Settings in the top right corner and check Show Hidden Files (dotfiles)).
- Right-click and Edit the file named .htaccess.
- Look for any code blocks that look like this:
# BEGIN cPanel-generated handler, do not edit
AddHandler application/x-httpd-ea-php74 ___lsphp .php
# END cPanel-generated handler
- Change the php74 reference to php84. Save your changes.
2. Check the MultiPHP / Select PHP Manager
Your host might have a master setting and a per-domain setting. The per-domain setting always overrides the master choice.
- Search your hosting panel for MultiPHP Manager or Select PHP Version.
- Find your specific domain name in the listed grid.
- Check if that specific domain has an individual dropdown box set explicitly to 7.4.
- Check the box next to your domain, change the dropdown menu to PHP 8.4, and hit Apply.
3. Clear Host-Level Server Caches
If you updated the system correctly but the WordPress admin panel won’t update, your dashboard is likely serving a cached snapshot.
- Go to your hosting control panel’s caching section (such as LiteSpeed, Nginx, or Varnish).
- Select Purge All Caches.
- Return to your WordPress admin screen and hard-refresh your browser (Ctrl + F5 or Cmd + Shift + R).
4. Check the .user.ini or php.ini Files
Some advanced hosting profiles allow folder-level configuration files to lock down PHP distributions.
- Return to your File Manager and inspect your public_html directory.
- Look for small files named php.ini or .user.ini.
- Open them in the text editor to see if they contain a manual path designation routing back to an old /opt/php74/ binary tree.
- If found, rename the file to php.ini.bak to test if WordPress instantly grabs the correct version.
