Suddenly I am getting the following error on my website, I don't know why, these are the following errors shown on my website:

1)Fatal error: Cannot declare class WP_User_Request, because the name is already in use in /home/hnukt37ls4nt/public_html/wp-includes/user.php on line 3657

2)Fatal error: Uncaught Error: Call to undefined function wp_kses_normalize_entities() in /home/hnukt37ls4nt/public_html/wp-includes/formatting.php:4316 Stack trace: #0 /home/hnukt37ls4nt/public_html/wp-includes/class-wp-fatal-error-handler.php(190): esc_url('https://wordpre...') #1 /home/hnukt37ls4nt/public_html/wp-includes/class-wp-fatal-error-handler.php(147): WP_Fatal_Error_Handler->display_default_error_template(Array, false) #2 /home/hnukt37ls4nt/public_html/wp-includes/class-wp-fatal-error-handler.php(52): WP_Fatal_Error_Handler->display_error_template(Array, false) #3 [internal function]: WP_Fatal_Error_Handler->handle() #4 {main} thrown in /home/hnukt37ls4nt/public_html/wp-includes/formatting.php on line 4316

Please help me in solving this error,

Thanks in advance. Cheers!!


1 Answer 1

  1. Just put your class in a if condition.
if( !class_exists( 'class_name' ) ) {
     class class_name {
     $object = new class_name();

This will work fine for first condition

  • WP_User_Request is a WordPress core class though, not one OP has added.
    – Rup
    Feb 5, 2021 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.