Question re using wp-cli (on OLS image installation)

Hi there,

I'm trying to use wp-cli on an recent OLS image installation. It seems to be having permissions issues, and possibly a PHP issue.

NOTE: I am not able to search for "wp-cli" on the forums, and the forum is breaking that up into "wp" and "cli" and then telling me these terms are too common and too short. Although I am sure many before me will have asked this question, and many answered it, so please feel free to point me to another post.

The permissions issue I got around by running wp-cli as www-data (`sudo -u www-data wp plugin update --all`). If that's the recommended solution for the permissions issue, I'll set up an alias for that.

The other error is this:
PHP Warning: Use of undefined constant ‘ALTERNATE_WP_CRON’ - assumed '‘ALTERNATE_WP_CRON’' (this will throw an Error in a future version of PHP) in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1277) : eval()'d code on line 90
objectcache.critical: Failed to initialize object cache: PhpRedis was not compiled with Zstandard compression support. For more information about enabling compressions see:

After that, when trying to update plug-ins, I get this error:
`Warning: bulk-editor: version higher than expected.`

Are either of these a concern? Can they be resolved with some wand waving?

Thanks …. Jonathan
Actually … I've now realised the `ALTERNATE_WP_CRON` related error has nothing to do with wp-cli issues. It's something odd with the website in question. Looking into that.

As for the objectcache.critical error, that's likely related to the site too. So will look into that elsewhere.

So all that remains in this question is to please confirm if `sudo -u www-data wp …` is the recommended way to go about running wp-cli on an OLS installation? I assume it is.