Skip to main content
RelayWP

WP-CLI Reference

WP-CLI integration requires RelayWP Pro.

Commands

Purge entire site cache

wp tagpurge purge all --yes

Purge a single post

wp tagpurge purge post 42

Purges all tags associated with post ID 42: the post itself, its author, categories, tags, post type archive, and feed.

Purge by cache tag

wp tagpurge purge tag category:news

Purge by URL

wp tagpurge purge url https://example.com/some-page/

Test API connection

wp tagpurge test

Outputs zone name, plan tier, and whether tag purge is supported.

Deployment hook example

# deploy.sh
wp tagpurge purge all --yes --path=/var/www/html
echo "Cache purged successfully"