Fatal error message when try to login to my wordpress site

Hi, when I try to login to my wordpress website I get the following message. I don’t know how to correct this:

Warning* : require_once(/home/texasgar/public_html/newsite/wp-admin/includes/class-custom-background.php): failed to open stream: No such file or directory in /home/texasgar/public_html/newsite/wp-includes/theme.php on line *2648

Fatal error* : require_once(): Failed opening required ‘/home/texasgar/public_html/newsite/wp-admin/includes/class-custom-background.php’ (include_path=‘.:/opt/alt/php70/usr/share/pear’) in /home/texasgar/public_html/newsite/wp-includes/theme.php on line *2648

There has been a critical error on your website. Please check your site admin email inbox for instructions.

Learn more about debugging in WordPress.

When I open the theme.php in dreamweaver and go to that line, this is the code I see. I am not a programmer, so not sure what is wrong.

if ( is_admin() ) {
			require_once( ABSPATH . 'wp-admin/includes/class-custom-background.php' );
			$custom_background = new Custom_Background( $args[0]['admin-head-callback'], $args[0]['admin-preview-callback'] );
		}

Appreciate any help you can provide…

The error message is telling you that this file is missing

/home/texasgar/public_html/newsite/wp-admin/includes/class-custom-background.php

Why? I’m afraid I couldn’t guess.

Thank you. I’ll see if I can find it and upload it.

I really appreciate your help.

1 Like

hi, sarahbarrick,
Failed to open stream error occurs because your WordPress site could not load the file from the code. Your blog may continue to load with the error message or may fails to load with error message saying fatal error . It can be fix by following the exact path shown in the error message. What you can do is :

  1. Regenerate .htaccess File
  2. Deactivate Plugins & Themes
  3. Check Files and Folders Permission

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.