Wordpress and PHP8

UKSBD

Moderator
  • Dec 30, 2005
    13,063
    1
    2,842
    Is anyone else having problems with Wordpress and PHP 8?

    I've just done a fresh set up on a new domain

    Set everything up using PHP 7.4, then once set up and working changed to PHP 8

    The site works using 8 but it automatically logs me out of control panel and when trying to login get the message

    "Error: the username *** is not registered on this site. If you are unsure of your username, try your email address instead."

    Switch back to 7.4 and all is OK again

    Fresh install using default theme and no plugins (apart from the 2 that come with fresh install)
     
    I haven't had any issue with it on PHP8 on dev platforms, although it's still not running on most production at the moment.

    Where are you running it? locally or a hosted environment

    Darren
     
    Upvote 0
    I haven't had any issue with it on PHP8 on dev platforms, although it's still not running on most production at the moment.

    Where are you running it? locally or a hosted environment

    Darren

    Just set it up on a live site which I'm currently setting up
     
    Upvote 0
    It’s all good with PHP8 here (over 20 live sites with all sorts of themes and plugins). Able to login on all of them.

    This feels more like a server issue than it does Wordpress. Login is not dependent on any php8 functionality.
     
    • Like
    Reactions: Solve My Problem
    Upvote 0
    We had some issues a while back with PHP8, from memory there was an issue with MySQLi(?).

    Are you using any plugins that handle user registration/login/redirects, etc? One client has had a site botched by plugins like this (not our doing, thankfully).

    Lastly, a desperate but possible thing is resetting the salts just incase of any odd caching?
     
    Upvote 0
    We had some issues a while back with PHP8, from memory there was an issue with MySQLi(?).

    Are you using any plugins that handle user registration/login/redirects, etc? One client has had a site botched by plugins like this (not our doing, thankfully).

    Lastly, a desperate but possible thing is resetting the salts just incase of any odd caching?

    It was a fresh install with no plugins and using the default theme.

    It's now got a couple of plugins (classic editor, classic widgets) and a bespoke theme and functions.php

    Still not working in PHP 8.00 but I tried it on 8:1 and appears to be fine.

    Not going to update any existing sites yet, just use this one for testing.
     
    Upvote 0
    Yes some Wordpress plugins are not compatible with PHP8 and may break your websites, although plugin creators were asked in Nov 2020 to make sure plugins became compatible with PHP8

    "All plugin and theme developers, as well as hosting communities, are called on to make their code compatible with PHP 8." (Nov 2020, Wordpress.org)
    Best answer is to deactivate all non essential Wordpress plugins before upgrading to PHP8

    Make sure only PHP8 compatible plugins are being used on your build

    I think PHP8 is a mandatory upgrade as support for PHP7.4 will end in 9 months on 28 Nov 2022


    Obviously back everything up before you upgrade PHP
     
    Upvote 0
    It’s all good with PHP8 here (over 20 live sites with all sorts of themes and plugins). Able to login on all of them.

    This feels more like a server issue than it does Wordpress. Login is not dependent on any php8 functionality.

    No issues here. I agree it is an account/server issue -- which web hosting control panel are you using?

    Be sure to check .htaccess and .usr.ini and php.ini (if any) to make sure there is no conflicting PHP7/8.
     
    • Like
    Reactions: SEODEV#338055
    Upvote 0
    Safe to upgrade to PHP8

    Best to check each plugin support site first

    You can email the support and ask if PHP8 is compatible with each plugin

    Time consuming but worthwhile
     
    Upvote 0
    Safe to upgrade to PHP8

    Best to check each plugin support site first

    You can email the support and ask if PHP8 is compatible with each plugin

    Time consuming but worthwhile
    If you read his post it’s a clean install. There are no plugins. The issue is the login screen which is doesn’t use any php8 functions.
     
    • Like
    Reactions: SEODEV#338055
    Upvote 0
    It wasn't just the login

    Once switching to 8 I was getting 503 errors

    I found the problem though

    For some reason my host hasn't got the mysqli extension available with PHP 8 they have mysqlnd instead.

    If I switch back to 7.4 or switch to 8.1 mysqli is available again and both work
     
    Upvote 0
    We had some issues a while back with PHP8, from memory there was an issue with MySQLi(?).
    Yes, it looks like that was the problem, my host hasn't got the MySQLi extension included with PHP 8.

    It's included with 7.4 and with 8.1, no idea why they haven't included it with 8 though, they just have mysqlnd instead
     
    • Like
    Reactions: SEODEV#338055
    Upvote 0
    Thanks for the update

    It's probably off topic but I have had a lot of challenges with PHP8 and Wordpress

    Starting a new thread
     
    Upvote 0

    Latest Articles