Title: PHP Fatal error: Uncaught Error: Class &#8220;qnap\WP_CLI_Command&#8221;
Last modified: June 8, 2022

---

# PHP Fatal error: Uncaught Error: Class “qnap\WP_CLI_Command”

 *  [kugmedia](https://wordpress.org/support/users/kugmedia/)
 * (@kugmedia)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-class-qnapwp_cli_command/)
 * When installing QNAP NAS Backup plugin on my server, the following error occurs(
   starting part):
    _PHP Fatal error: Uncaught Error: Class “qnap\WP\_CLI\_Command”
   not found in /var/www/vhosts/…/httpdocs/wp-content/plugins/qnap-nas-backup/lib/
   vendor/qeek/command/class-qnap-wp-cli-command.php:25 Stack trace: #0 …_
 * Installing on two other servers it works. I tried different PHP versions up to
   8.1, nothing did help. Please check, what could be the problem?

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

 *  [fcwu](https://wordpress.org/support/users/fcwu/)
 * (@fcwu)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-class-qnapwp_cli_command/#post-15723899)
 * May you try to modify line 213 in “/var/www/vhosts/…/httpdocs/wp-content/plugins/
   qnap-nas-backup/lib/controller/class-qnap-main-controller.php”
 * from
 * WP_CLI::add_command( ‘qnap’, ‘QNAP_WP_CLI_Command’, array( ‘shortdesc’ => __(‘
   QNAP WP Migration Command’, QNAP_PLUGIN_NAME ) ) );
 * to
 * WP_CLI::add_command( ‘qnap’, ‘qnap\QNAP_WP_CLI_Command’, array( ‘shortdesc’ =
   > __( ‘QNAP WP Migration Command’, QNAP_PLUGIN_NAME ) ) );
 * I guess it’s a namespace problem.
 *  Thread Starter [kugmedia](https://wordpress.org/support/users/kugmedia/)
 * (@kugmedia)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-class-qnapwp_cli_command/#post-15725249)
 * Unfortunately updating line 213 did not help …
 * I also wonder, why it works on two other servers, but not on this one (which 
   is important for me). Could there be something different in the WP installation?
   Does the WP CLI “environment” has to be installed specifically? How could I test
   if WP CLI works right?
 *  [fcwu](https://wordpress.org/support/users/fcwu/)
 * (@fcwu)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-class-qnapwp_cli_command/#post-15725499)
 * Looks like this plugin does not support well on wp cli. I just trace QNAP_WP_CLI_Command,
   and it finally returns error. I think it’s ok to delete `public function wp_cli()`
   in the same file.

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

The topic ‘PHP Fatal error: Uncaught Error: Class “qnap\WP_CLI_Command”’ is closed
to new replies.

 * ![](https://ps.w.org/qnap-nas-backup/assets/icon-256x256.png?rev=2595501)
 * [QNAP NAS Backup](https://wordpress.org/plugins/qnap-nas-backup/)
 * [Support Threads](https://wordpress.org/support/plugin/qnap-nas-backup/)
 * [Active Topics](https://wordpress.org/support/plugin/qnap-nas-backup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/qnap-nas-backup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/qnap-nas-backup/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [fcwu](https://wordpress.org/support/users/fcwu/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-error-class-qnapwp_cli_command/#post-15725499)
 * Status: not resolved