WordPress TutorialRemove Version from WordPress and StylesheetsRun WordPress local with XAMPPSecurity in WordPress - EscapingSecurity in WordPress - SanitizationThe Loop (main WordPress loop)Update WordPress ManuallyWordPress Actions and FiltersWordPress add action()WordPress add editor style()WordPress add menu page()WordPress Add ShortcodeWordPress add submenu page()WordPress add theme support()WordPress Add/remove contact info for users with user contactmethods filter hookWordPress Admin Dashboard WidgetsWordPress AJAXWordPress Alternating main loop (pre get posts filter)WordPress Child Theme BasicsWordPress Create a Post ProgrammaticallyWordPress Create Template for Custom Post TypeWordPress Creating a custom templateWordPress Custom exerpts with excerpt length and excerpt moreWordPress Custom Post TypesWordPress Customizer Basics (Add Panel, Section, Setting, Control)WordPress Customizer Hello WorldWordPress DebuggingWordPress Enqueuing scriptsWordPress Enqueuing StylesWordPress Function : wp trim words()WordPress Function: add action()WordPress get bloginfo()WordPress get home path()WordPress get option()WordPress get permalink()WordPress get template part()WordPress get the category()WordPress get the title()WordPress home url()WordPress How Can I integrate Markdown editor with Advance Custom Fields repeater Add-on.WordPress initWordPress Installation and ConfigurationWordPress Making network requests with HTTP APIWordPress Meta BoxWordPress Options APIWordPress Plugin creationWordPress Plugin developmentWordPress Post FormatsWordPress Querying postsWordPress Remove Auto Line Breaks from Content and ExcerptWordPress REST APIWordPress Secure your installationWordPress ShortcodeWordPress Shortcode with attributeWordPress ShortcodesWordPress SidebarsWordPress Site MigrationWordPress TaxonomiesWordPress Template hierarchyWordPress template includeWordPress the $wpdb ObjectWordPress the Admin Bar (aka The Toolbar)WordPress the title()WordPress theme and child-theme developmentWordPress ThemesWordPress wp get current user()WordPress WP Query() LoopWordPress WP-CLIWordPress WP-Cron

WordPress WP-CLI

From WikiOD

WP*CLI is a set of command-line tools for managing WordPress installations. You can update plugins, configure multisite installs and much more, without using a web browser.

Manage themes[edit | edit source]

Get a list of themes.

$ wp theme list

Install the latest version from wordpress.org and activate

$ wp theme install twentysixteen --activate

Install from a local zip file

$ wp theme install ../my-theme.zip

Install from a remote zip file

$ wp theme install http://s3.amazonaws.com/bucketname/my-theme.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef

Get details of an installed theme

$ wp theme get twentysixteen --fields=name,title,version

Get status of theme

$ wp theme status twentysixteen

Manage plugins[edit | edit source]

Get a list of plugins

$ wp plugin list

List active plugins on the site.

$ wp plugin list --status=active --format=json

List plugins on each site in a network.

$ wp site list --field=url | xargs -I % wp plugin list --url=%

Activate plugin

$ wp plugin activate hello-dolly

Deactivate plugin

$ wp plugin deactivate hello-dolly

Delete plugin

$ wp plugin delete hello-dolly

Install the latest version from wordpress.org and activate

$ wp plugin install bbpress --activate

Manage WP-CLI itself[edit | edit source]

Display the version currently installed.

$ wp cli version

Check for updates to WP-CLI.

$ wp cli check-update

Update WP-CLI to the latest stable release.

$ wp cli update

List all available aliases.

$ wp cli alias

Print various details about the WP-CLI environment.

$ wp cli info

Dump the list of installed commands, as JSON.

$ wp cli cmd-dump

Download, install, update and manage a WordPress install.[edit | edit source]

Download WordPress core

$ wp core download --locale=nl_NL

Install WordPress

$ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword --admin_email=info@example.com

Display the WordPress version

$ wp core version

Transform a single-site install into a WordPress multisite install.

$ wp core multisite-convert

Install WordPress multisite from scratch.

$ wp core multisite-install

Manage users[edit | edit source]

List user IDs

$ wp user list --field=ID

Create a new user.

$ wp user create bob bob@example.com --role=author

Update an existing user.

$ wp user update 123 --display_name=Mary --user_pass=marypass

Delete user 123 and reassign posts to user 567

$ wp user delete 123 --reassign=567

Perform basic database operations using credentials stored in wp-config.php[edit | edit source]

Create a new database.

$ wp db create

Drop an existing database.

$ wp db drop --yes

Reset the current database.

$ wp db reset --yes

Execute a SQL query stored in a file.

$ wp db query < debug.sql