• 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)
  • 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

    (@kugmedia)

    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?

    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.