Bug Report
Describe the current, buggy behavior
On some wordpress installation when using wp theme list --allow-root or wp plugin list --allow-root with root I get this error:
# wp theme list --allow-root
PHP Fatal error: Uncaught TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /srv/www/wp-admin/includes/class-wp-filesystem-ftpext.php:438
Stack trace:
#0 /srv/www/wp-admin/includes/class-wp-filesystem-ftpext.php(438): ftp_nlist()
#1 /srv/www/wp-admin/includes/class-wp-filesystem-base.php(231): WP_Filesystem_FTPext->exists()
#2 /srv/www/wp-admin/includes/class-wp-filesystem-base.php(58): WP_Filesystem_Base->find_folder()
#3 /srv/www/wp-content/themes/evolve/inc/admin/customizer/customizer.php(1193): WP_Filesystem_Base->abspath()
#4 /srv/www/wp-content/themes/evolve/inc/admin/customizer/customizer.php(1149): evolve_get_controls_from_json()
#5 /srv/www/wp-includes/class-wp-hook.php(341): evolve_load_the_theme_options()
#6 /srv/www/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
#7 /srv/www/wp-includes/plugin.php(522): WP_Hook->do_action()
#8 /srv/www/wp-settings.php(742): do_action()
#9 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1374): require('...')
#10 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1293): WP_CLI\Runner->load_wordpress()
#11 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#12 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(84): WP_CLI\Bootstrap\LaunchRunner->process()
#13 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(35): WP_CLI\bootstrap()
#14 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('...')
#15 /usr/local/bin/wp(4): include('...')
#16 {main}
thrown in /srv/www/wp-admin/includes/class-wp-filesystem-ftpext.php on line 438
Fatal error: Uncaught TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /srv/www/wp-admin/includes/class-wp-filesystem-ftpext.php:438
Stack trace:
#0 /srv/www/wp-admin/includes/class-wp-filesystem-ftpext.php(438): ftp_nlist()
#1 /srv/www/wp-admin/includes/class-wp-filesystem-base.php(231): WP_Filesystem_FTPext->exists()
#2 /srv/www/wp-admin/includes/class-wp-filesystem-base.php(58): WP_Filesystem_Base->find_folder()
#3 /srv/www/wp-content/themes/evolve/inc/admin/customizer/customizer.php(1193): WP_Filesystem_Base->abspath()
#4 /srv/www/wp-content/themes/evolve/inc/admin/customizer/customizer.php(1149): evolve_get_controls_from_json()
#5 /srv/www/wp-includes/class-wp-hook.php(341): evolve_load_the_theme_options()
#6 /srv/www/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
#7 /srv/www/wp-includes/plugin.php(522): WP_Hook->do_action()
#8 /srv/www/wp-settings.php(742): do_action()
#9 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1374): require('...')
#10 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1293): WP_CLI\Runner->load_wordpress()
#11 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#12 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(84): WP_CLI\Bootstrap\LaunchRunner->process()
#13 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(35): WP_CLI\bootstrap()
#14 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('...')
#15 /usr/local/bin/wp(4): include('...')
#16 {main}
thrown in /srv/www/wp-admin/includes/class-wp-filesystem-ftpext.php on line 438
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
This does not happen when using a standard user.
Describe what you would expect as the correct outcome
I would expect not to get this error, as when running with a standard user.
Let us know what environment you are running this on
OS: Linux 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
Shell: /bin/bash
PHP binary: /usr/bin/php8.2
PHP version: 8.2.30
php.ini used: /etc/php/8.2/cli/php.ini
MySQL binary: /usr/bin/mariadb
MySQL version: mariadb Ver 15.1 Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
SQL modes:
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: phar:///usr/local/bin/wp
WP-CLI packages dir:
WP-CLI cache dir: /root/.wp-cli/cache
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.12.0
Bug Report
Describe the current, buggy behavior
On some wordpress installation when using
wp theme list --allow-rootorwp plugin list --allow-rootwith root I get this error:This does not happen when using a standard user.
Describe what you would expect as the correct outcome
I would expect not to get this error, as when running with a standard user.
Let us know what environment you are running this on