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

  1. Find the file and line: enable WordPress debugging (define( 'WP_DEBUG', true ); and define( 'WP_DEBUG_LOG', true ); in wp-config.php) and read wp-content/debug.log.
  2. Update the theme or plugin named there. If no update exists, the code must use $_SERVER['REQUEST_URI'] instead of REQUEST_URI.
  3. Turn WP_DEBUG off again.

Tip: Temporarily switching the site to an older PHP version can buy time, but replacing the outdated code is the real fix.

Related services

Web hosting

shared hosting on Virtualmin with NVMe storage, free SSL and email.

Managed cPanel VPS

cPanel included; we handle updates, security and monitoring.

Hire an expert

engineers per 15 minutes, per hour or per month, with no contract.

Was this answer helpful?

Still stuck? Open a ticket