SOLVED cPanel WordPress Manager Error - "/usr/local/bin/php"

CDT

Registered
Jun 3, 2019
4
3
3
New Zealand
cPanel Access Level
Root Administrator
Greeting everyone...
/etc/redhat-release:CentOS release 6.10 (Final)
/usr/local/cpanel/version:11.80.0.11
/var/cpanel/envtype:virtuozzo
CPANEL=release

I have a couple of Wordpress sites I installed "manually" (i.e. server side). I am wanting Wordpress Manager to recognize these sites... after running the "Discover Sites" I get the following error. Screenshot attached.

"The system found a new WordPress site, “/home/alamojo/public_html/wp-config.php”, but could not make it manageable because of the following error: (XID csn2k9) “/usr/local/bin/php” reported error code “255” when it ended: "

Wordpress also returns this error in error_log:
"[04-Jun-2019 11:46:11 Pacific/Auckland] PHP Fatal error: Uncaught Error: Call to undefined function add_filter() in phar:///usr/local/cpanel/3rdparty/share/cpanel-wp-cli/wp-cli.phar/vendor/wp-cli/config-command/src/Config_Command.php(358) : eval()'d code:91
Stack trace:
#0 phar:///usr/local/cpanel/3rdparty/share/cpanel-wp-cli/wp-cli.phar/vendor/wp-cli/config-command/src/Config_Command.php(358): eval()
#1 phar:///usr/local/cpanel/3rdparty/share/cpanel-wp-cli/wp-cli.phar/vendor/wp-cli/config-command/src/Config_Command.php(289): Config_Command::get_wp_config_vars()
#2 [internal function]: Config_Command->list_(Array, Array)
#3 phar:///usr/local/cpanel/3rdparty/share/cpanel-wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(93): call_user_func(Array, Array, Array)
#4 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
#5 phar:///usr/local/cpanel/3rdparty/share/cpanel-wp-cli/wp-cli.phar/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(449): call_user_func(Object(Closure), Array, Array)
# in phar:///usr/local/cpanel/3rdparty/share/cpanel-wp-cli/wp-cli.phar/vendor/wp-cli/config-command/src/Config_Command.php(358) : eval()'d code on line 91
"
 

Attachments

  • Like
Reactions: Samson06

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello @CDT,

Can you open a support ticket so we can take a closer look at your system to see why the Discover Sites feature in WordPress Manager isn't working as intended?

You can post the ticket number here once it's opened and I'll link this forums thread to it.

Thank you.
 

CDT

Registered
Jun 3, 2019
4
3
3
New Zealand
cPanel Access Level
Root Administrator
This was resolved :) Very simple fix

This was occurring due to having 'add_filter( 'auto_update_plugin', '__return_false' );' set within the wp-config.php file.

I've commented the variable.

[ [email protected] /home/axxxxo/public_html]# grep auto_update_plugin wp-config.php
#add_filter( 'auto_update_plugin', '__return_false' );

Afterward, I was able to get the WordPress Manager to work successfully.
Thanks to
JC Newton, Technical Analyst III / Migration Specialist, cPanel L.L.C.