brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: wp site list shows every site of a wordpress multisite network

WordPress
~/tips/tip-wordpress-multisite-site-list

wp site list --fields=blog_id,url,registered --format=table

Prints the sites of a multisite network, either as a table or as plain URLs for scripts.

On a network with many sites, the Network Admin screen is a slow way to find a URL.

wp site list --fields=blog_id,url,registered --format=table
wp site list --field=url

wp site list prints one row per site in the network. With --field=url you get only the addresses, one per line, which can be piped into xargs to run the same command on each site. It only works on a multisite install, otherwise WP-CLI reports that the site is not a multisite. Add --archived=1 or --deleted=1 to see sites with that status.

Further reading: WP-CLI: wp site list

More WordPress tips wp user application-password create anna backup-script --porcelain define( 'MEDIA_TRASH', true ); wp cli check-update wp theme delete --all wp media image-size All WordPress tips (85) All topics

Link