Symptoms
WP Toolkit is unable to locate an installed WordPress site, and the WP Toolkit error log contains an error similar to the following.
Scanning for WordPress websites was performed with errors:
Failed to register instance at '/home/username/public_html': Failed to reset cache for the instance #6:
Fatal error: Uncaught Error: Undefined constant "WPINC" in /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1316) : eval()'d code:102
Stack trace:
#0 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1316): eval()
#1 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1274): WP_CLI\Runner->load_wordpress()
#2 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#3 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
#4 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/wp-cli.php(32): WP_CLI\bootstrap()
#5 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/boot-fs.php(17): require_once('/usr/local/cpan...')
#6 /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/wpt-wp-cli.php(31): require_once('/usr/local/cpan...')
#7 Command line code(1): require('/usr/local/cpan...')
#8 {main}
thrown in /usr/local/cpanel/3rdparty/wp-toolkit/plib/vendor/wp-cli/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1316) : eval()'d code on line 102
Cause
The issue occurs when the WordPress database or a required file configured in the wp-config.php file is missing or misnamed.
Resolution
Ensure that all files on require_once and include_once lines of the wp-config.php file are present in the correct location and that the database is accessible with the configured values. If a file is missing, it will have to be restored or the related line in the config file will have to be removed.
Comments
0 comments
Article is closed for comments.