0
votes

I am facing following warning and error on my website:

Warning: require(/home/content/52/9606252/html/k9grooming/wp-includes/option.php) [function.require]: failed to open stream: No such file or directory in /home/content/52/9606252/html/k9grooming/wp-includes/functions.php on line 8

Fatal error: require() [function.require]: Failed opening required '/home/content/52/9606252/html/k9grooming/wp-includes/option.php' (include_path='.:/usr/local/php5_3/lib/php') in /home/content/52/9606252/html/k9grooming/wp-includes/functions.php on line 8

Line 8 is: require( ABSPATH . WPINC . '/option.php' );

2
so make sure, the referenced file is present, where is it expected. - Sirko
Sounds like you are missing some of the core WordPress files. - doublesharp

2 Answers

0
votes

I have to agree with @doublesharp.

Note !! Before doing the below: Try to restore older version of functions.php file where an option.php may be included, or try commenting out this area in the code. Please create a back-up and do this carefully so you can restore if something breaks. If you have version control implemented this would be easier. If you can't find an older version where option.php makes sense, you might have do the below.

1.) Deactive all plugins (one by one to see if still experiencing the error). There's a chance it's a faulty plugin. Try to isolate the troublesome plugin -- so you can remove / uninstall completely.

2.) If your sure it's not due to too many plugins or a bad one; Try re-installing your theme (make a back up of what you currently have if you can / didn't already. If you did skip this step).

3.) Re-install theme (manually via direct FTP connection).

4.) If your still experiencing this error (or a hole as I like to call it). Upgrade to the latest stable version of WP (manually via direct FTP). After you do this, see 1.) 2.) and 3.) again.

5.) If this doesn't work; you may need a clean fresh WP install. Delete your WP directory (see first back-up note on 1.)) Then re-install manually, reconfigure to server (under new fresh DB). Reinstall WP theme again manually.

-1
votes

To fix this issue after 6 years?

You will have to use these changes to files in respectively:

"wp-includes/functions.php": add before this code at line "7":

if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
if ( ! defined( 'WPINC' ) ) {
define( 'WPINC', __DIR__ . '/wp-includes' );
}

! Also with "wp-includes/blocks/index.php" at the line "7"

These codes should just be placed before the problems that are occurred by certainly php-fpm is forgetting the code which is defined in root in the file wp-config.php