WP-CLI is a powerful tool that allows you to manage a WordPress site via the command line, without the need to use wp-admin.
📌 Table of Contents
✅ What is WP-CLI?
WP-CLI is a tool that allows you to execute administrative tasks in WordPress via the terminal. With it, you can install, manage, and upgrade WordPress sites using simple commands.
🛠️ Installing WP-CLI
WP-CLI comes pre-installed on all Domain Market packages that support terminal access.
🔑 Key Features of WP-CLI
- WordPress Management (installation, upgrade)
- Plugins & Themes Management
- User Management
- Posts & Comments Management
- Database Management
📌 Useful WP-CLI Commands
📌 WordPress Management
wp core download
wp core update
wp core update-db
📌 Plugins Management
wp plugin install woocommerce --activate
wp plugin update --all
wp plugin delete plugin-name
📌 Themes Management
wp theme install astra --activate
wp theme list
wp theme delete theme-name
📌 User Management
wp user create username email@example.com --role=editor --user_pass=password
wp user update admin --user_pass=newpassword
wp user delete user_id
📌 Posts Management
wp post create --post_title="My First Post" --post_content="This is the content." --post_status=publish
wp post delete post_id
📌 Database Management
wp db export backup.sql
wp db import backup.sql
wp db query "SELECT * FROM wp_users;"
🔥 Advanced Functions & Automations
🚀 Bulk Update WordPress + Plugins + Themes
wp core update && wp plugin update --all && wp theme update --all
🚀 Cache Flush
wp cache flush
🚀 WordPress Health Check
wp doctor check
🎯 Conclusion
WP-CLI is an essential tool for every WordPress administrator, as it enables automation and faster management of WordPress sites.
🏆 Why Use WP-CLI?
- ✔️ Speed: Performs tasks faster than the web interface.
- ✔️ Automation: Ideal for bulk actions.
- ✔️ Convenience: No need to log in to the admin panel.
- ✔️ Efficiency: Perfect for developers and DevOps.
📢 At Domain Market, we provide WordPress Hosting with full WP-CLI support. If you want a fast and reliable solution, choose our packages!
Your feedback helps us improve your digital experience!