Updated: 11 October 2026 · Applies to: WordPress 7.1
This error comes from PHP code that uses REQUEST_URI without the $_SERVER array, usually in an old theme or plugin. In PHP 8 it is no longer a warning but a fatal error ("Undefined constant"), which can make the site go blank.
Fix
- Find the file and line: enable WordPress debugging (
define( 'WP_DEBUG', true );anddefine( 'WP_DEBUG_LOG', true );inwp-config.php) and readwp-content/debug.log. - Update the theme or plugin named there. If no update exists, the code must use
$_SERVER['REQUEST_URI']instead ofREQUEST_URI. - Turn
WP_DEBUGoff again.
Tip: Temporarily switching the site to an older PHP version can buy time, but replacing the outdated code is the real fix.