Support » Fixing WordPress » PHP version not updated in WP

  • Davis

    (@webmanager62)


    My host, EarthLink, via their PHP Manager, says I’m running PHP 7.4
    WP continues to give error message in Tools/Site Health that I’m on 7.2.25
    From another post in this thread with a similar topic, I learned about .htaccess files
    Editing those files solved their problem
    Their .htaccess file was pointing to the wrong installation of PHP
    I have no idea how to edit .htaccess files
    I found 4 of them on my site:
    *one dated 12/21/20 is in /
    *one dated 12/11/20 is in /public
    *one dated 10/24/20 is in /public/wp-content/plugins/akismet
    *one dated 06/07.20 is in /public/wp-content/updraft
    I have downloaded all 4. Here are the contents:
    —————————————————————————————
    dated 12/21/20 in /
    DirectoryIndex index.html index.webc home.html index.htm index.shtml home.htm index.cgi home.cgi index.php4 index.php5 index.php default.htm default.html index.phtml
    AddType application/x-httpd-php .php .phtml .php3 .php5 .php4
    [5 blank lines]
    SetEnv PHPRC /services/webpages/n/o/noana.org/php.ini

    —————————————————————————————
    dated 12/11/20 in /public
    DirectoryIndex index.php
    # BEGIN WordPress
    # The directives (lines) between “BEGIN WordPress” and “END WordPress” are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.

    # END WordPress
    # for PHP7.4-CGI
    AddHandler php-cgi .php
    Action php-cgi /cgi-bin/php-cgi

    —————————————————————————————
    dated 10/24/20 in /public/wp-content/plugins/akismet
    # Only allow direct access to specific Web-available files.

    # Apache 2.2
    <IfModule !mod_authz_core.c>
    Order Deny,Allow
    Deny from all
    </IfModule>

    # Apache 2.4
    <IfModule mod_authz_core.c>
    Require all denied
    </IfModule>

    # Akismet CSS and JS
    <FilesMatch “^(form\.js|akismet\.js|akismet\.css)$”>
    <IfModule !mod_authz_core.c>
    Allow from all
    </IfModule>

    <IfModule mod_authz_core.c>
    Require all granted
    </IfModule>
    </FilesMatch>

    # Akismet images
    <FilesMatch “^logo-full-2x\.png$”>
    <IfModule !mod_authz_core.c>
    Allow from all
    </IfModule>

    <IfModule mod_authz_core.c>
    Require all granted
    </IfModule>
    </FilesMatch>

    —————————————————————————————
    dated 06/07.20 in /public/wp-content/updraft
    deny from all
    —————————————————————————————
    Is this enough info for someone to help?
    I would like to have WP/Tools/Site Health report correct PHP version or fix it if I’m somehow still running the older version despite what EarthLink says.
    Any help will be greatly appreciated!
    Many thanks, Davis

    • This topic was modified 2 months, 1 week ago by Davis.
    • This topic was modified 2 months, 1 week ago by Davis. Reason: additional file information
Viewing 7 replies - 1 through 7 (of 7 total)
  • Godaddy hosts our web site in the office. The admin page had a box to switch to PHP 7.4 and the other versions, if you plugins didn’t work. Check with your hosting site.

    This is the rule in the /public/ directory that sets the PHP version (Don’t change this manually):

    
    # for PHP7.4-CGI
    AddHandler php-cgi .php
    Action php-cgi /cgi-bin/php-cgi
    

    What PHP version does this plugin report?

    Thread Starter Davis

    (@webmanager62)

    @scsiraidguru
    Thank you
    In my host’s control panel there is an app: PHP Manager
    I used it a couple of weeks ago to upgrade to version 7.4
    Today, because I got the error in WP, I checked the host via PHP Manager
    It still tells me I’m running 7.4

    Thread Starter Davis

    (@webmanager62)

    @pidengmor
    Many thanks
    I have downloaded, installed and activated Display PHP Version
    As per instructions, I opened my WP Dashboard
    In the “In a Glance” box
    It shows “WordPress 5.6 running Twenty Fifteen theme”
    And “Running PHP version 7.2.25”
    Background: I used PHP Manager in my host CP to upgrade to PHP 7.4 about 2 weeks ago
    At that time I did not notice or check for any error messages in WP, I thought all was OK
    I see the lines of code you mentioned in the /public/ file. If this is there, why is PHP not switched to 7.4?
    Note: I saw this error message about PHP when I went to update the 20-15 theme. Would that update possibly fix this error? I have not run theme’s update. Thought I should fix PHP first.
    Thank you again for your help and quick reply

    • This reply was modified 2 months, 1 week ago by Davis.
    • This reply was modified 2 months, 1 week ago by Davis.

    You need to contact your host. The PHP Manager in cPanel is only installing the latest version of PHP 7.2.x. That version is no longer supported: https://www.php.net/supported-versions.php . They need to fix this.

    Thread Starter Davis

    (@webmanager62)

    @pidengmor
    Thank you for pointing me in the right direction
    I will contact host today
    Again, many thanks

    No problem at all.
    Good luck!

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.