0

I execute following command to change password for admin user from command line: wp user update admin --user_pass="mynewpassword" --allow-root I got following error message:

WordPress database error You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near ''wp_poststats_visits'' at line 1 for query DROP
TABLE IF EXISTS 'wp_poststats_visits' made by
include('phar:///usr/local/bin/wp/php/boot-phar.php'),
include('phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'),
WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process,
WP_CLI\Runner->start, WP_CLI\Runner->load_wordpress,
require('wp-settings.php'),
include_once('/plugins/wp-post-real-time-statistics/index.php'),
PostStatsHelper::uninstall

Information about system:

wp cli info
OS: Linux 4.13.0-38-generic #43-Ubuntu SMP Wed Mar 14 15:20:44 UTC 2018 x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php7.1
PHP version: 7.1.17-0ubuntu0.17.10.1
php.ini used: /etc/php/7.1/cli/php.ini

  • 1
    I'd guess there's a plugin that's causing you grief. wp user update shouldn't have to DROP TABLE to work. Do you have a plugin installed called "poststats" or something along those lines? – Pat J Sep 28 '18 at 21:17
  • @PatJ : Yes, I have a plugin with this name. – plaidshirt Sep 30 '18 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.