NinjaFirewall prevents wp-cli from working correctly
-
I have noticed that activating NinjaFirewall on my WordPress blogs prevents wp-cli from working: all wp-cli commands exit immediately, without showing any output. Putting wp-cli in debug mode shows only the initial debugging output and exits before getting to the “Loaded WordPress” message.
Here’s an example: with WordPress 4.9.6 and NinjaFirewall 3.6.6 (activated) I get
[www@bravo htdocs] $ wp theme list --debug Debug (bootstrap): No readable global config found (0.049s) Debug (bootstrap): No project config found (0.049s) Debug (bootstrap): argv: /usr/local/bin/wp theme list --debug (0.049s) Debug (bootstrap): ABSPATH defined: /srv/www/servers/www.datafaber.com/htdocs/ (0.05s) Debug (bootstrap): Begin WordPress load (0.05s) Debug (bootstrap): wp-config.php path: /srv/www/servers/www.datafaber.com/htdocs/wp-config.php (0.05s) [www@bravo htdocs] $ echo $? 255The wp-cli command exits with a status code of 255 and doesn’t show the list of plugins. If I deactivate NinjaFirewall from the WordPress admin and I try again the same command I get
[www@bravo htdocs] $ wp theme list --debug Debug (bootstrap): No readable global config found (0.048s) Debug (bootstrap): No project config found (0.049s) Debug (bootstrap): argv: /usr/local/bin/wp theme list --debug (0.049s) Debug (bootstrap): ABSPATH defined: /srv/www/servers/www.datafaber.com/htdocs/ (0.049s) Debug (bootstrap): Begin WordPress load (0.049s) Debug (bootstrap): wp-config.php path: /srv/www/servers/www.datafaber.com/htdocs/wp-config.php (0.049s) Debug (bootstrap): Loaded WordPress (0.19s) Debug (bootstrap): Running command: theme list (0.19s) +---------------+----------+--------+---------+ | name | status | update | version | +---------------+----------+--------+---------+ | balloons | active | none | 1.0 | | twentyfifteen | inactive | none | 2.0 | +---------------+----------+--------+---------+ [www@bravo.datafaber.net htdocs] $ echo $? 0Any idea on how to solve this issue? I’d like to keep NinjaFirewall and wp-cli is essential to my workflow of keeping themes and plugins updated on several sites.
The topic ‘NinjaFirewall prevents wp-cli from working correctly’ is closed to new replies.