How to fix Warning: Use of undefined constant REQUEST_URI – assumed ‘REQUEST_URI’
After a manual WordPress update, you might get the following error: “constant REQUEST_URI – assumed ‘REQUEST_URI’ (this will throw an Error in a future version of PHP) in /home/example/public_html/wp-content/themes/example/functions.php on line 73“.
To fix this you have to locate that particular line 73 or whatever the line is. The best way is to login to C-Panel and follow the path indicated above i.e home/example/public_html/wp-content/themes/example/functions.php please note ‘example’ represents the name of the folder as you named it.
After locating it replace this function:
$path = $_SERVER[‘HTTP_HOST’] . $_SERVER[REQUEST_URI];
$path = $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’];
Remember to save the changes and reload your website. The error should most probably disappear now. If it doesn’t then the cause could be something else but in most cases it’s usually the cause.