Want more timely Centmin Mod News Updates?
Become a Member

PHP Upgrading from PHP 7.3 to 8.1 - Wordpress showing critical error

Discussion in 'Nginx and PHP-FPM news & discussions' started by runos, Dec 22, 2021.

  1. runos

    runos Member

    57
    17
    8
    Dec 17, 2019
    Ratings:
    +22
    Local Time:
    2:09 PM
    1.17.6
    10
    Hi all!


    I tried upgrading from PHP 7.3 to 8.1 and 2 out of 4 wordpress websites failed to load. Now I'm setting up a new Linode test server with latest PHP 8.1 to test the failed websites.

    From what I read, I should try to disable all plugins and themes first. Any other advice besides what's posted by admin himself here:
    https://community.centminmod.com/threads/php-8-1-0-ga-stable-release.22166/#post-90784

    Thanks!
    -J
     
  2. savvasha

    savvasha New Member

    18
    4
    3
    Nov 30, 2018
    Ratings:
    +7
    Local Time:
    9:09 AM
    Nginx 1.15.x
    MariaDB 10.1.x
    You can check your php error log to see which files cause the errors. That way you can disable only the affected plugins until you solve the issue.
     
  3. buik

    buik “The best traveler is one without a camera.”

    1,990
    518
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,647
    Local Time:
    8:09 AM
  4. runos

    runos Member

    57
    17
    8
    Dec 17, 2019
    Ratings:
    +22
    Local Time:
    2:09 PM
    1.17.6
    10
    Thanks for the reply guys. I just found out I've got 2 old plugins that gave critical error after upgrading. Will revert back to 7.4 for now
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    4:09 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah Wordpress only supports PHP 8.0 right now
     
  6. adamus007p

    adamus007p Member

    366
    18
    18
    Feb 8, 2019
    Ratings:
    +35
    Local Time:
    8:09 AM
    Even beta 8.0 only.

    According to PHP Compatibility and WordPress Versions – Make WordPress Core

    PHP 8.0 is beta support only from WordPress 5.6: Added “beta support” for PHP 8.0 and also 5.8.

    Make sure that your theme and plugins are comptatible with php 8.0

    If not, you will get an email what cause the problem, in email you will find link to rescue mode when you can click and turn off or check plugins.
     
  7. buik

    buik “The best traveler is one without a camera.”

    1,990
    518
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,647
    Local Time:
    8:09 AM
    Not a Wordpress user.
    As Wordpress is not compatible with PHP 8.*

    Is WordPress able to send you a mail in case of incompatibility?
    As the Wordpress core itself is also not compatible and so on, it can crash when it tries to mail you. Via the same incompatible PHP code, running on PHP 8.*.
     
  8. adamus007p

    adamus007p Member

    366
    18
    18
    Feb 8, 2019
    Ratings:
    +35
    Local Time:
    8:09 AM
    PHP 8.0 is beta compatible with Wordpress.
    PHP 8.1 it is not compatible with Wordpress at all.
    This is an official info from Wordpress website.

    To try use PHP 8.0 you need to:
    check if your theme is compatible with PHP 8.0
    check if your plugins are compatible with PHP 8.0
    and update it.

    When it will crash, you will get email that your website has technical problems.
    You will get info which plugins caused the problem.
    Error log
    and link to rescue mode, where Wordpress will disable problem plugin and you can update or remove it.

    Alternatively you can in FTP rename (name to _name for example) one by one plugin name to detect what cause the problem.

    Make sure to make a backup.

    The best way is update everything (Wordpresss, Theme, Plugins) and update PHP to 8.0

    Last week I have done it and now I use PHP 8.0 with Wordpress.
     
  9. savvasha

    savvasha New Member

    18
    4
    3
    Nov 30, 2018
    Ratings:
    +7
    Local Time:
    9:09 AM
    Nginx 1.15.x
    MariaDB 10.1.x
    In my experience, most of the popular plugins and themes are compatible with PHP8.0. Some deprecated warnings may be appear here and there. I made the upgrade to my sites a couple of months ago and everything is ok. It depends ofcourse from your plugins and/or any custom code you integrated :)
     
  10. buik

    buik “The best traveler is one without a camera.”

    1,990
    518
    113
    Apr 29, 2016
    Flanders
    Ratings:
    +1,647
    Local Time:
    8:09 AM
  11. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    4:09 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  12. Jay Chen

    Jay Chen Active Member

    181
    60
    28
    Sep 10, 2017
    Ratings:
    +116
    Local Time:
    2:09 AM
    I was in similar situation a few weeks back, good thing is I know some php development, so I ended up deleting the incompatible plugin and wrote my own. Now my sites are all running on PHP 8.0 with no issues for a few weeks now