Back to Documentation
WordPress
WP-CLI Access
Manage WordPress from the command line. Run WP-CLI commands directly from your dashboard or via SSH.
1Dashboard Terminal
Access WP-CLI through the dashboard:
- Go to your WordPress site dashboard
- Click "Terminal" in the sidebar
- Type WP-CLI commands directly
The terminal is available on all WordPress plans.
2Common Commands
Useful WP-CLI commands:
# Core WordPress
wp core version
wp core update
wp core verify-checksums
# Plugins
wp plugin list
wp plugin install woocommerce --activate
wp plugin update --all
wp plugin deactivate plugin-name
# Themes
wp theme list
wp theme activate flavor
wp theme update --all
# Database
wp db export backup.sql
wp db import backup.sql
wp db optimize
# Users
wp user list
wp user create newuser email@example.bericanlabs.com --role=editor
# Cache
wp cache flush
wp transient delete --all
3SSH Access
For Professional plan users, connect via SSH:
- Go to Site Settings > SSH Access
- Add your public SSH key
- Copy the SSH connection string
- Connect from your terminal
ssh yoursite@ssh.bericanlabs.com
4Search & Replace
Update URLs throughout your database:
# Dry run first (recommended)
wp search-replace 'http://old-domain.com' 'https://new-domain.com' --dry-run
# Execute the replacement
wp search-replace 'http://old-domain.com' 'https://new-domain.com'
# Skip specific tables
wp search-replace 'old' 'new' --skip-tables=wp_users
Tip: Always create a backup before running search-replace!
5Bulk Operations
Efficiently manage content in bulk:
# Delete all spam comments
wp comment delete $(wp comment list --status=spam --format=ids)
# Delete all post revisions
wp post delete $(wp post list --post_type=revision --format=ids)
# Update all posts of a type
wp post update $(wp post list --post_type=post --format=ids) --post_status=draft
# Export all users to CSV
wp user list --format=csv > users.csv