Join the community today
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

    44
    14
    8
    Dec 17, 2019
    Ratings:
    +17
    Local Time:
    4:50 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

    12
    0
    1
    Nov 30, 2018
    Ratings:
    +2
    Local Time:
    10:50 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.” Premium Member

    1,506
    407
    83
    Apr 29, 2016
    Flanders
    Ratings:
    +1,284
    Local Time:
    9:50 AM
  4. runos

    runos Member

    44
    14
    8
    Dec 17, 2019
    Ratings:
    +17
    Local Time:
    4:50 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

    47,837
    10,910
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,947
    Local Time:
    6:50 PM
    Nginx 1.21.x
    MariaDB 10.x
    Yeah Wordpress only supports PHP 8.0 right now
     
  6. adamus007p

    adamus007p Member

    274
    17
    18
    Feb 8, 2019
    Ratings:
    +29
    Local Time:
    9:50 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.” Premium Member

    1,506
    407
    83
    Apr 29, 2016
    Flanders
    Ratings:
    +1,284
    Local Time:
    9:50 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

    274
    17
    18
    Feb 8, 2019
    Ratings:
    +29
    Local Time:
    9:50 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

    12
    0
    1
    Nov 30, 2018
    Ratings:
    +2
    Local Time:
    10:50 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 :)