On this page you find all important commands for the CLI tool wp. If the
command you are looking for is missing please ask our AI.
wp
WP-CLI is the command-line interface for WordPress. You can update plugins, configure multisite installations and much more, without using a web browser.
Articles in our magazine for wp:
How to install WordPress via the CLI?
Install WordPress without a control panel? It is definitely possible. We have briefly outlined the way here.
List of commands for wp:
-
wordpress:cli:config:create Create basic `wpconfig` file (assuming database on `localhost`).$ wp config create --dbname=${dbname} --dbuser=${dbuser} --dbpass=${dbpass}try on your machineexplain this command
-
wordpress:cli:database:replace Replace all instances of a string in the database.$ wp search-replace ${old_string} ${new_string}try on your machineexplain this command
-
wordpress:cli:import:xwr Import the contents of a WordPress Extended RSS (WXR) file.$ wp import ${filename-xml}try on your machineexplain this command
-
wordpress:cli:information Print information about the operating system, shell, PHP, and WP-CLI (`wp`) installation.$ wp --infotry on your machineexplain this command
-
wordpress:cli:plugins:install-and-activate Install and activate a WordPress plugin.$ wp plugin install ${plugin} --activatetry on your machineexplain this command
-
wordpress:versions:install Download an old version of WordPress X.X.X using WP-CLI$ wp core download --version=${version}try on your machineexplain this command