Back to WP-CLI

WP-CLI Core Commands

Core commands manage the WordPress installation itself — downloading, installing, updating, and verifying the files that power every WordPress site.

These are the commands you run when setting up a new environment, automating deployments, or maintaining production servers.


wp-cli-core — bash

Commands

wp core download

Downloads WordPress core files into the current directory.

Bash
wp core download
wp core download --version=6.4.3
wp core download --locale=uk
wp core download --path=/var/www/mysite

Use --version to pin a specific release. Use --locale to download a localized version. Useful when provisioning servers or setting up local environments from scratch.


wp core install

Installs WordPress after the database is configured.

Bash
wp core install \
  --url=https://mysite.com \
  --title="My Site" \
  --admin_user=admin \
  --admin_password=secret \
  --admin_email=admin@mysite.com

Requires an existing database and wp-config.php. Run wp config create and wp db create first. A complete WordPress installation from terminal takes under 10 seconds.


wp core multisite-install

Installs a WordPress Multisite network.

Bash
wp core multisite-install \
  --url=https://mynetwork.com \
  --title="My Network" \
  --admin_user=admin \
  --admin_email=admin@mynetwork.com

Use this when building multisite networks, SaaS platforms on WordPress, or managing multiple client sites under one installation.


wp core version

Displays the currently installed WordPress version.

Bash
wp core version
wp core version --extra

--extra also shows the PHP and MySQL versions. Useful in auditing scripts or when debugging compatibility issues.


wp core check-update

Checks whether a newer WordPress version is available.

Bash
wp core check-update

Returns version number, update type (major/minor), and download URL. Commonly used in maintenance scripts before running wp core update.


wp core update

Updates WordPress core to the latest version.

Bash
wp core update
wp core update --version=6.5.0
wp core update --minor

--minor restricts updates to minor releases only — safer for production environments. Always run wp db export before updating on production.


wp core update-db

Updates the WordPress database schema after a core update.

Bash
wp core update-db
wp core update-db --network

Some WordPress releases include database changes. This command applies them. Use --network on multisite to update all sites in the network at once.


wp core is-installed

Checks whether WordPress is installed in the current directory.

Bash
wp core is-installed
wp core is-installed --network

Returns exit code 0 if installed, 1 if not. Useful in shell scripts to conditionally run installation steps.

Bash
if ! wp core is-installed; then
  wp core install ...
fi

wp core verify-checksums

Compares core files against official WordPress checksums.

Bash
wp core verify-checksums

Detects modified, corrupted, or missing core files. Used during security audits to confirm the installation hasn’t been tampered with. If any file fails the check — investigate before proceeding.


wp core language install

Manages WordPress language packs.

Bash
wp core language install uk
wp core language activate uk
wp core language update
wp core language list --status=installed

Useful when deploying multilingual sites or managing localized WordPress environments.


Common Workflows

Deploy a new WordPress site

Bash
wp core download
wp config create --dbname=mydb --dbuser=root --dbpass=secret
wp db create
wp core install \
  --url=https://mysite.com \
  --title="My Site" \
  --admin_user=admin \
  --admin_password=secret \
  --admin_email=admin@mysite.com

Full installation from terminal in under a minute.

Maintenance update sequence

Bash
wp db export backup-$(date +%Y%m%d).sql
wp core check-update
wp core update
wp core update-db
wp cache flush

Export database first, then update, then flush cache. Safe pattern for production.

Security audit

Bash
wp core version
wp core verify-checksums
wp core check-update

Quick three-command check to confirm version, file integrity, and update status.


Related Command Groups

  • Plugins — manage plugins after core is set up
  • Database — export, import, and optimize the database
  • Cache — flush cache after core updates

Practice Cases – coming soon…!