Title: Error when activating plugin with wp cli command
Last modified: January 23, 2024

---

# Error when activating plugin with wp cli command

 *  Resolved [wepimedia](https://wordpress.org/support/users/wepimedia/)
 * (@wepimedia)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/error-when-activating-plugin-with-wp-cli-command/)
 * Installation and activation of this plugin via wordpress backend works fine.
 * When I try to activate it from the command line I get this error:
 * WordPress database error You have an error in your SQL syntax; check the manual
   that corresponds to your MariaDB server version for the right syntax to use near‘
   IF EXISTS wp_ip2location_country_blocker_rate_limit_log’ at line 1 for query 
   DROP IF EXISTS wp_ip2location_country_blocker_rate_limit_log 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->run_command_and_exit,
   WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func,
   WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher{closure}, call_user_func,
   Plugin_Command->activate, activate_plugin, do_action(‘activate_ip2location-country-
   blocker/ip2location-country-blocker.php’), WP_Hook->do_action, WP_Hook->apply_filters,
   IP2LocationCountryBlocker->set_defaults, IP2LocationCountryBlocker->create_table
 * The module still gets activated and seems to work too.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [IP2Location](https://wordpress.org/support/users/ip2location/)
 * (@ip2location)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/error-when-activating-plugin-with-wp-cli-command/#post-17367543)
 * Please download the version 2.34.1 for this fix. Thanks!
 *  Thread Starter [wepimedia](https://wordpress.org/support/users/wepimedia/)
 * (@wepimedia)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/error-when-activating-plugin-with-wp-cli-command/#post-17368341)
 * The error is gone, thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error when activating plugin with wp cli command’ is closed to new replies.

 * ![](https://ps.w.org/ip2location-country-blocker/assets/icon-128x128.png?rev=
   2121917)
 * [IP2Location Country Blocker](https://wordpress.org/plugins/ip2location-country-blocker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ip2location-country-blocker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ip2location-country-blocker/)
 * [Active Topics](https://wordpress.org/support/plugin/ip2location-country-blocker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ip2location-country-blocker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ip2location-country-blocker/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [wepimedia](https://wordpress.org/support/users/wepimedia/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/error-when-activating-plugin-with-wp-cli-command/#post-17368341)
 * Status: resolved