Wordpress toolkit - Call to undefined function is_admin() in /usr/share/plesk-wp-cli/php/wp-cli.php(18)

Created:

2016-11-16 13:05:07 UTC

Modified:

2017-04-24 11:22:24 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Wordpress toolkit - Call to undefined function is_admin() in /usr/share/plesk-wp-cli/php/wp-cli.php(18)

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

WordPress Toolkit shown the error below:

Call to undefined function is_admin() in /usr/share/plesk-wp-cli/php/wp-cli.php(18) : eval()'d code on line 87

The same if you will run it from CLI

# /usr/local/psa/admin/bin/wpmng --user=domain_user-- --path=/var/www/vhosts/domain.tld/httpdocs core info --format=json --check-updates=true

PHP Fatal error: Call to undefined function is_admin() in /usr/share/plesk-wp-cli/php/wp-cli.php(18) : eval()'d code on line 87

Cause

Modified wp-config.php file inside a Wordpress installation document root. Function is_admin() could be handled properly while it evaluated from CLI.

Resolution

Either remove his function from the wp-config.php or modify it, as it shown on example below:

if(function_exists('is_admin'))
Have more questions? Submit a request
Please sign in to leave a comment.