WP-CLI Get Site ID from its url
It looks like –url isn’t working to filter the wp site list output. So instead one could try: wp site list | awk ‘{ if( $2 == SITE_URL_STRING ) print $1; }’ where we use the awk trick from here, to filter the url column and display the blog_id column. Here we must replace SITE_URL_STRING … Read more