WP CLI ERRORS – Call to undefined function add_cacheaction()
-
I am creating a plugin for dynamic content. I copy and pasted the original sample plugin code and create a plugin called cache-dynamic.
https://github.com/Automattic/wp-super-cache/blob/master/plugins/dynamic-cache-test.php
When I try to run a wp cli command of any kind I get the error:
Fatal error: Uncaught Error: Call to undefined function add_cacheaction() in /home/xxxxx/newsletters.xxxxx.com/wp-content/plugins/cache-dynamic/dynamic-cache-test.php:25
Stack trace: 0 /home/xxxxx/newsletters.xxxxxx.com/wp-settings.php(462): include_once() 1 /usr/local/wp/php/WP_CLI/Runner.php(1351): require(‘/home/xxxx…’) 2 /usr/local/wp/php/WP_CLI/Runner.php(1269): WP_CLI\Runner->load_wordpress() 3 /usr/local/wp/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start() 4 /usr/local/wp/php/bootstrap.php(83): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState)) 5 /usr/local/wp/php/wp-cli.php(32): WP_CLI\bootstrap() 6 /usr/local/wp/php/boot-fs.php(17): require_once(‘/usr/local/wp/p…’) 7 {main}thrown in /home/xxxx/newsletters.xxxxx.com/wp-content/plugins/cache-dynamic/dynamic-cache-test.php on line 25
Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
- The topic ‘WP CLI ERRORS – Call to undefined function add_cacheaction()’ is closed to new replies.