In some cases, after changing your PHP version from within cPanel, WordPress may state that the version you just modified is still on an older version (the one you did not set). In situations like this, the solution is usually to modify your .htaccess file to remove the hard-coded PHP version being selected.
You can do this by using the following instructions below :
- Navigate to your cPanel account, if you’re not sure how to access your cPanel account, click here to learn how!
- Once you are logged into your cPanel account, you’ll want to look for the file manager icon within cPanel.
- Once you are in the file manager, you’ll need to look into the top right corner of the page and select “Settings”, once the pop-up appears, check the box that says “Show hidden files”.
- Once you’ve selected show hidden files, you’ll then navigate to your public_html directory (or, the directory that your website is located in, generally, this is public_html).
- Once in the public_html directory look for the file called .htaccess, right-click the file, and hit “edit”.
- Once on the edit page for .htaccess, the code you’re wanting to comment out will be located towards the bottom of the page, it will look similar to the following :
# Use PHP(7|7.1|7.2|7.3|7.4) as default AddHandler application/x-httpd-php(70|71|72|73|74) .php
- You can comment this out by adding # to the left of each line, you’ll want to comment it all out, then save the file.
While this is not always the solution, it’s a typical issue to a common problem. The add handler overrides the version you selected from within your cPanel installation.