phpwordpressphp-8custom-theme

Error while updating to PHP 8 on Wordpress Custom Theme


I'm doing a required update to PHP 8 on the WordPress custom theme.

The suggestion from WPEngine is: to change the theme back to the default one, disable all plugins, update to PHP 8, then switch back to the custom theme.

I tried the same steps but the result was a blank page (sometimes the page below), and the Console tab showed "Failed to load resource: the server responded with a status of 500 ()" enter image description here

enter image description here

Does anyone have the experience to resolve this? Any suggestions would be appreciated.

Update: A few of error logs

PHP Warning: Constant WP_POST_REVISIONS already defined in /nas/content/live/recession/wp-config.php on line 113

PHP Fatal error: Uncaught Error: Call to undefined function pll_register_string() in /nas/content/live/recession/wp-content/themes/recession/functions.php:91

#10 /nas/content/live/recession/index.php(17): require('/nas/content/li...')

auditor:event=wp_login {"user_id":11,"blog_id":1,"event":"wp_login","current_user_id":0,"remote_addr":"90.13.800.12"}

Should I ignore errors from live? I believe it's the error while I attempted to preview the site.


Solution

  • A few notes for some newbies (like myself) while updating the custom theme to PHP 8.0: