How to extend WP-CLI to access is_multisite function.
-
Hi,
I have a simple bash script that sits on a redhat server and needs to check if a particular WordPress (6.5.4) folder is a multi-site or not. I spotted this in the docs:
https://developer.www.ads-software.com/reference/functions/is_multisite/
I’ve added my basic code below, but my script doesn’t like the syntax. I’m new to bash and PHP and wondered if I can achieve this via extending WP-CLI access or if I need my Bash script to call into a PHP function? Any tips/examples of the best way to achieve this are most appreciated.
vim multisitecheck.sh
require_once(“wp-load.php”);
if ( is_multisite() )
then
echo multisite present
fi
echo check completeMany Thanks.
- The topic ‘How to extend WP-CLI to access is_multisite function.’ is closed to new replies.