PHPackages                             wp-cli/core-command - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. wp-cli/core-command

ActiveWp-cli-package[CLI &amp; Console](/categories/cli)

wp-cli/core-command
===================

Downloads, installs, updates, and manages a WordPress installation.

v2.1.27(1mo ago)5110.2M↑37.7%58[2 issues](https://github.com/wp-cli/core-command/issues)20MITPHPCI passing

Since Apr 18Pushed 1mo ago7 watchersCompare

[ Source](https://github.com/wp-cli/core-command)[ Packagist](https://packagist.org/packages/wp-cli/core-command)[ Docs](https://github.com/wp-cli/core-command)[ RSS](/packages/wp-cli-core-command/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (14)Versions (75)Used By (20)

wp-cli/core-command
===================

[](#wp-clicore-command)

Downloads, installs, updates, and manages a WordPress installation.

[![Testing](https://github.com/wp-cli/core-command/actions/workflows/testing.yml/badge.svg)](https://github.com/wp-cli/core-command/actions/workflows/testing.yml)

Quick links: [Using](#using) | [Installing](#installing) | [Contributing](#contributing) | [Support](#support)

Using
-----

[](#using)

This package implements the following commands:

### wp core

[](#wp-core)

Downloads, installs, updates, and manages a WordPress installation.

```
wp core

```

**EXAMPLES**

```
# Download WordPress core
$ wp core download --locale=nl_NL
Downloading WordPress 4.5.2 (nl_NL)...
md5 hash verified: c5366d05b521831dd0b29dfc386e56a5
Success: WordPress downloaded.

# Install WordPress
$ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword --admin_email=info@example.com
Success: WordPress installed successfully.

# Display the WordPress version
$ wp core version
4.5.2

```

### wp core check-update

[](#wp-core-check-update)

Checks for WordPress updates via Version Check API.

```
wp core check-update [--minor] [--major] [--force-check] [--field=] [--fields=] [--format=]

```

Lists the most recent versions when there are updates available, or success message when up to date.

**OPTIONS**

```
[--minor]
	Compare only the first two parts of the version number.

[--major]
	Compare only the first part of the version number.

[--force-check]
	Bypass the transient cache and force a fresh update check.

[--field=]
	Prints the value of a single field for each update.

[--fields=]
	Limit the output to specific object fields. Defaults to version,update_type,package_url.

[--format=]
	Render output in a particular format.
	---
	default: table
	options:
	  - table
	  - csv
	  - count
	  - json
	  - yaml
	---

```

**EXAMPLES**

```
$ wp core check-update
+---------+-------------+-------------------------------------------------------------+
| version | update_type | package_url                                                 |
+---------+-------------+-------------------------------------------------------------+
| 4.5.2   | major       | https://downloads.wordpress.org/release/wordpress-4.5.2.zip |
+---------+-------------+-------------------------------------------------------------+

```

### wp core check-update-db

[](#wp-core-check-update-db)

Checks for the need for WordPress database updates.

```
wp core check-update-db [--network]

```

Compares the current database version with the version required by WordPress core to determine if database updates are needed.

**OPTIONS**

```
[--network]
	Check databases for all sites on a network.

```

**EXAMPLES**

```
# Check if database update is needed
$ wp core check-update-db
Success: WordPress database is up to date.

# Check database update status for all sites on a network
$ wp core check-update-db --network
Success: WordPress databases are up to date on 5/5 sites.

```

### wp core download

[](#wp-core-download)

Downloads core WordPress files.

```
wp core download [] [--path=] [--locale=] [--version=] [--skip-content] [--force] [--insecure] [--extract] [--skip-locale-check]

```

Downloads and extracts WordPress core files to the specified path. Uses current directory when no path is specified. Downloaded build is verified to have the correct md5 and then cached to the local filesystem. Subsequent uses of command will use the local cache if it still exists.

**OPTIONS**

```
[]
	Download directly from a provided URL instead of fetching the URL from the wordpress.org servers.

[--path=]
	Specify the path in which to install WordPress. Defaults to current
	directory.

[--locale=]
	Select which language you want to download.

[--version=]
	Select which version you want to download. Accepts a version number, 'latest' or 'nightly'.

[--skip-content]
	Download WP without the default themes and plugins.

[--force]
	Overwrites existing files, if present.

[--insecure]
	Retry download without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack.

[--extract]
	Whether to extract the downloaded file. Defaults to true.

[--skip-locale-check]
	If specified, allows downloading an older version of WordPress when the requested locale is not available for the latest release.

```

**EXAMPLES**

```
$ wp core download --locale=nl_NL
Downloading WordPress 4.5.2 (nl_NL)...
md5 hash verified: c5366d05b521831dd0b29dfc386e56a5
Success: WordPress downloaded.

```

### wp core install

[](#wp-core-install)

Runs the standard WordPress installation process.

```
wp core install --url= --title= --admin_user= [--admin_password=] --admin_email= [--locale=] [--skip-email]

```

Creates the WordPress tables in the database using the URL, title, and default admin user details provided. Performs the famous 5 minute install in seconds or less.

Note: if you've installed WordPress in a subdirectory, then you'll need to `wp option update siteurl` after `wp core install`. For instance, if WordPress is installed in the `/wp` directory and your domain is example.com, then you'll need to run `wp option update siteurl http://example.com/wp` for your WordPress installation to function properly.

Note: When using custom user tables (e.g. `CUSTOM_USER_TABLE`), the admin email and password are ignored if the user\_login already exists. If the user\_login doesn't exist, a new user will be created.

**OPTIONS**

```
--url=
	The address of the new site.

--title=
	The title of the new site.

--admin_user=
	The name of the admin user.

[--admin_password=]
	The password for the admin user. Defaults to randomly generated string.

--admin_email=
	The email address for the admin user.

[--locale=]
	The locale/language for the installation (e.g. `de_DE`). Default is `en_US`.

[--skip-email]
	Don't send an email notification to the new admin user.

```

**EXAMPLES**

```
# Install WordPress in 5 seconds
$ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword --admin_email=info@example.com
Success: WordPress installed successfully.

# Install WordPress without disclosing admin_password to bash history
$ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_email=info@example.com --prompt=admin_password < admin_password.txt

```

### wp core is-installed

[](#wp-core-is-installed)

Checks if WordPress is installed.

```
wp core is-installed [--network]

```

Determines whether WordPress is installed by checking if the standard database tables are installed. Doesn't produce output; uses exit codes to communicate whether WordPress is installed.

**OPTIONS**

```
[--network]
	Check if this is a multisite installation.

```

**EXAMPLES**

```
# Bash script for checking if WordPress is not installed.

if ! wp core is-installed 2>/dev/null; then
    # WP is not installed. Let's try installing it.
    wp core install
fi

# Bash script for checking if WordPress is installed, with fallback.

if wp core is-installed 2>/dev/null; then
    # WP is installed. Let's do some things we should only do in a confirmed WP environment.
    wp core verify-checksums
else
    # Fallback if WP is not installed.
    echo 'Hey Friend, you are in the wrong spot. Move in to your WordPress directory and try again.'
fi

```

### wp core multisite-convert

[](#wp-core-multisite-convert)

Transforms an existing single-site installation into a multisite installation.

```
wp core multisite-convert [--title=] [--base=] [--subdomains] [--skip-config]

```

**Alias:** `install-network`

Creates the multisite database tables, and adds the multisite constants to wp-config.php.

For those using WordPress with Apache, remember to update the `.htaccess`file with the appropriate multisite rewrite rules.

[Review the multisite documentation](https://wordpress.org/support/article/create-a-network/)for more details about how multisite works.

**OPTIONS**

```
[--title=]
	The title of the new network.

[--base=]
	Base path after the domain name that each site url will start with.
	---
	default: /
	---

[--subdomains]
	If passed, the network will use subdomains, instead of subdirectories. Doesn't work with 'localhost'.

[--skip-config]
	Don't add multisite constants to wp-config.php.

```

**EXAMPLES**

```
$ wp core multisite-convert
Set up multisite database tables.
Added multisite constants to wp-config.php.
Success: Network installed. Don't forget to set up rewrite rules.

```

### wp core multisite-install

[](#wp-core-multisite-install)

Installs WordPress multisite from scratch.

```
wp core multisite-install [--url=] [--base=] [--subdomains] --title= --admin_user= [--admin_password=] --admin_email= [--skip-email] [--skip-config]

```

Creates the WordPress tables in the database using the URL, title, and default admin user details provided. Then, creates the multisite tables in the database and adds multisite constants to the wp-config.php.

For those using WordPress with Apache, remember to update the `.htaccess`file with the appropriate multisite rewrite rules.

**OPTIONS**

```
[--url=]
	The address of the new site.

[--base=]
	Base path after the domain name that each site url in the network will start with.
	---
	default: /
	---

[--subdomains]
	If passed, the network will use subdomains, instead of subdirectories. Doesn't work with 'localhost'.

--title=
	The title of the new site.

--admin_user=
	The name of the admin user.
	---
	default: admin
	---

[--admin_password=]
	The password for the admin user. Defaults to randomly generated string.

--admin_email=
	The email address for the admin user.

[--skip-email]
	Don't send an email notification to the new admin user.

[--skip-config]
	Don't add multisite constants to wp-config.php.

```

**EXAMPLES**

```
$ wp core multisite-install --title="Welcome to the WordPress" \
> --admin_user="admin" --admin_password="password" \
> --admin_email="user@example.com"
Single site database tables already present.
Set up multisite database tables.
Added multisite constants to wp-config.php.
Success: Network installed. Don't forget to set up rewrite rules.

```

### wp core update

[](#wp-core-update)

Updates WordPress to a newer version.

```
wp core update [] [--minor] [--version=] [--force] [--locale=] [--format=] [--insecure]

```

**Alias:** `upgrade`

Defaults to updating WordPress to the latest version.

If you see "Error: Another update is currently in progress.", you may need to run `wp option delete core_updater.lock` after verifying another update isn't actually running.

**OPTIONS**

```
[]
	Path to zip file to use, instead of downloading from wordpress.org.

[--minor]
	Only perform updates for minor releases (e.g. update from WP 4.3 to 4.3.3 instead of 4.4.2).

[--version=]
	Update to a specific version, instead of to the latest version. Alternatively accepts 'nightly'.

[--force]
	Update even when installed WP version is greater than the requested version.

[--locale=]
	Select which language you want to download.

[--format=]
	Render output in a particular format.
	---
	options:
	  - table
	  - csv
	  - json
	---

[--insecure]
	Retry download without certificate validation if TLS handshake fails. Note: This makes the request vulnerable to a MITM attack.

```

**EXAMPLES**

```
# Update WordPress
$ wp core update
Updating to version 4.5.2 (en_US)...
Downloading update from https://downloads.wordpress.org/release/wordpress-4.5.2-no-content.zip...
Unpacking the update...
Cleaning up files...
No old files were removed.
Success: WordPress updated successfully.

# Update WordPress using zip file.
$ wp core update ../latest.zip
Starting update...
Unpacking the update...
Success: WordPress updated successfully.

# Update WordPress to 3.1 forcefully
$ wp core update --version=3.1 --force
Updating to version 3.1 (en_US)...
Downloading update from https://wordpress.org/wordpress-3.1.zip...
Unpacking the update...
Cleaning up files...
No old files were removed.
Warning: Could not retrieve WordPress core checksums; skipping checksum-based cleanup. Files listed in $_old_files were still cleaned up.
Success: WordPress updated successfully.

```

### wp core update-db

[](#wp-core-update-db)

Runs the WordPress database update procedure.

```
wp core update-db [--network] [--dry-run]

```

**OPTIONS**

```
[--network]
	Update databases for all sites on a network

[--dry-run]
	Compare database versions without performing the update.

```

**EXAMPLES**

```
# Update the WordPress database.
$ wp core update-db
Success: WordPress database upgraded successfully from db version 36686 to 35700.

# Update databases for all sites on a network.
$ wp core update-db --network
WordPress database upgraded successfully from db version 35700 to 29630 on example.com/
Success: WordPress database upgraded on 123/123 sites.

# Update databases for all sites on a specific network in a multinetwork install.
$ wp core update-db --network --url=network2.example.com
WordPress database upgraded successfully from db version 35700 to 29630 on network2.example.com/
Success: WordPress database upgraded on 50/50 sites.

```

### wp core version

[](#wp-core-version)

Displays the WordPress version.

```
wp core version [--extra]

```

**OPTIONS**

```
[--extra]
	Show extended version information.

	Note: In a Multisite installation, `wp core version --extra` reports the expected database
	revision from `wp-includes/version.php`, not the per-site `db_version` stored in each
	subsite's options table. To retrieve a subsite's stored database revision, use
	`wp option get db_version --url=`. See also `wp core check-update-db`.

```

**EXAMPLES**

```
# Display the WordPress version
$ wp core version
4.5.2

# Display WordPress version along with other information
$ wp core version --extra
WordPress version: 4.5.2
Database revision: 36686
TinyMCE version:   4.310 (4310-20160418)
Package language:  en_US

```

Installing
----------

[](#installing)

This package is included with WP-CLI itself, no additional installation necessary.

To install the latest version of this package over what's included in WP-CLI, run:

```
wp package install git@github.com:wp-cli/core-command.git

```

Contributing
------------

[](#contributing)

We appreciate you taking the initiative to contribute to this project.

Contributing isn’t limited to just code. We encourage you to contribute in the way that best fits your abilities, by writing tutorials, giving a demo at your local meetup, helping other users with their support questions, or revising our documentation.

For a more thorough introduction, [check out WP-CLI's guide to contributing](https://make.wordpress.org/cli/handbook/contributing/). This package follows those policy and guidelines.

### Reporting a bug

[](#reporting-a-bug)

Think you’ve found a bug? We’d love for you to help us get it fixed.

Before you create a new issue, you should [search existing issues](https://github.com/wp-cli/core-command/issues?q=label%3Abug%20) to see if there’s an existing resolution to it, or if it’s already been fixed in a newer version.

Once you’ve done a bit of searching and discovered there isn’t an open or fixed issue for your bug, please [create a new issue](https://github.com/wp-cli/core-command/issues/new). Include as much detail as you can, and clear steps to reproduce if possible. For more guidance, [review our bug report documentation](https://make.wordpress.org/cli/handbook/bug-reports/).

### Creating a pull request

[](#creating-a-pull-request)

Want to contribute a new feature? Please first [open a new issue](https://github.com/wp-cli/core-command/issues/new) to discuss whether the feature is a good fit for the project.

Once you've decided to commit the time to seeing your pull request through, [please follow our guidelines for creating a pull request](https://make.wordpress.org/cli/handbook/pull-requests/) to make sure it's a pleasant experience. See "[Setting up](https://make.wordpress.org/cli/handbook/pull-requests/#setting-up)" for details specific to working on this package locally.

### License

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

Support
-------

[](#support)

GitHub issues aren't for general support questions, but there are other venues you can try:

*This README.md is generated dynamically from the project's codebase using `wp scaffold package-readme` ([doc](https://github.com/wp-cli/scaffold-package-command#wp-scaffold-package-readme)). To suggest changes, please submit a pull request against the corresponding part of the codebase.*

###  Health Score

70

—

ExcellentBetter than 100% of packages

Maintenance88

Actively maintained with recent releases

Popularity62

Solid adoption and visibility

Community42

Growing community involvement

Maturity78

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~60 days

Recently: every ~18 days

Total

55

Last Release

53d ago

Major Versions

v1.0.12 → v2.0.02018-08-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b5740d002b5556abcceed36e016c8f8ba6f533eefef6107b3c60a830704993b?d=identicon)[danielbachhuber](/maintainers/danielbachhuber)

![](https://www.gravatar.com/avatar/6dde7f578e5530884238e7173f768ae3a890b6d66eb99262a82f2c494a1b67d4?d=identicon)[schlessera](/maintainers/schlessera)

---

Top Contributors

[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (921 commits)")[![scribu](https://avatars.githubusercontent.com/u/225715?v=4)](https://github.com/scribu "scribu (315 commits)")[![schlessera](https://avatars.githubusercontent.com/u/83631?v=4)](https://github.com/schlessera "schlessera (230 commits)")[![swissspidy](https://avatars.githubusercontent.com/u/841956?v=4)](https://github.com/swissspidy "swissspidy (102 commits)")[![gitlost](https://avatars.githubusercontent.com/u/481982?v=4)](https://github.com/gitlost "gitlost (47 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (30 commits)")[![wojsmol](https://avatars.githubusercontent.com/u/4176111?v=4)](https://github.com/wojsmol "wojsmol (29 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (26 commits)")[![ernilambar](https://avatars.githubusercontent.com/u/2098823?v=4)](https://github.com/ernilambar "ernilambar (22 commits)")[![gilbitron](https://avatars.githubusercontent.com/u/203882?v=4)](https://github.com/gilbitron "gilbitron (21 commits)")[![rodrigoprimo](https://avatars.githubusercontent.com/u/77215?v=4)](https://github.com/rodrigoprimo "rodrigoprimo (19 commits)")[![miya0001](https://avatars.githubusercontent.com/u/309946?v=4)](https://github.com/miya0001 "miya0001 (17 commits)")[![nylen](https://avatars.githubusercontent.com/u/227022?v=4)](https://github.com/nylen "nylen (14 commits)")[![stephenharris](https://avatars.githubusercontent.com/u/3255034?v=4)](https://github.com/stephenharris "stephenharris (13 commits)")[![mbovel](https://avatars.githubusercontent.com/u/777748?v=4)](https://github.com/mbovel "mbovel (12 commits)")[![tlovett1](https://avatars.githubusercontent.com/u/1844351?v=4)](https://github.com/tlovett1 "tlovett1 (9 commits)")[![NateWr](https://avatars.githubusercontent.com/u/2306629?v=4)](https://github.com/NateWr "NateWr (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (7 commits)")[![mwilliamson](https://avatars.githubusercontent.com/u/391876?v=4)](https://github.com/mwilliamson "mwilliamson (7 commits)")[![francescolaffi](https://avatars.githubusercontent.com/u/357331?v=4)](https://github.com/francescolaffi "francescolaffi (6 commits)")

---

Tags

clicorehacktoberfestwordpresswp-cliwp-cli-package

### Embed Badge

![Health badge](/badges/wp-cli-core-command/health.svg)

```
[![Health](https://phpackages.com/badges/wp-cli-core-command/health.svg)](https://phpackages.com/packages/wp-cli-core-command)
```

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[wp-cli/extension-command

Manages plugins and themes, including installs, activations, and updates.

919.0M53](/packages/wp-cli-extension-command)[humbug/box

Fast, zero config application bundler with PHARs.

1.3k801.5k69](/packages/humbug-box)[wp-cli/entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.

1048.8M55](/packages/wp-cli-entity-command)[wp-cli/scaffold-command

Generates code for post types, taxonomies, blocks, plugins, child themes, etc.

1717.7M15](/packages/wp-cli-scaffold-command)[pantheon-systems/terminus

A command line interface for Pantheon

3391.5M13](/packages/pantheon-systems-terminus)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
