WP-CLI是一个命令行工具,用于管理和维护WordPress网站。以下是一些WP-CLI的常用命令,用于管理WordPress网站:
wp core download --locale=zh_CN
wp core config --dbname=database_name --dbuser=username --dbpass=password --dbhost=localhost --dbprefix=wp_
wp core install --url=example.com --title=Site Title --admin_user=admin --admin_password=password --admin_email=admin@example.com
wp core update
wp plugin install plugin-name
wp plugin activate plugin-name
wp plugin deactivate plugin-name
wp plugin update plugin-name
wp plugin delete plugin-name
wp theme install theme-name
wp theme activate theme-name
wp theme deactivate theme-name
wp theme update theme-name
wp theme delete theme-name
wp user create username user@example.com --user_pass="password"
wp user delete 3
wp post create --post_type=post --post_title='Post Title' --post_content='Post Content'
wp post update 10 --post_title='New Title'
wp post delete 1
wp db export
wp db import database.sql
wp db optimize
wp db repair
以上是一些常用的WP-CLI命令,用于管理WordPress网站。请注意,这仅是一些示例命令,WP-CLI有更多命令可用于管理WordPress网站。