wp core download
Overview
Download WordPress core files from WordPress.org directly to your server. The first step in any fresh WordPress installation — no browser, no FTP required.
What It Does
wp core download fetches the WordPress core package from WordPress.org and extracts it into the current directory (or the path specified via --path). It does not install or configure WordPress — that is handled by wp core install.
Syntax
wp core download [--path=<path>] [--locale=<locale>] [--version=<version>] [--force] [--insecure]
Options & Flags
| Flag | Default | Description |
|---|---|---|
--path=PATH | Current directory | Download to a specific directory |
--locale=LOCALE | en_US | Download in a specific language (e.g. id_ID, fr_FR) |
--version=VERSION | Latest stable | Download a specific WordPress version |
--force | — | Overwrite existing files |
--insecure | — | Skip SSL verification |
Basic Usage
Download the latest WordPress
cd /var/www/html
wp core download
Download a specific version
wp core download --version=6.4.3
Download in Indonesian language
wp core download --locale=id_ID
Download to a specific path
wp core download --path=/var/www/newsite
Force overwrite of existing core files
wp core download --force
--force overwrites core files
Use --force for recovery scenarios (corrupted or hacked core files). Always take a backup first. It is not a substitute for wp core update.
Expected Output
Downloading WordPress 6.7.2 (en_US)...
md5 hash verified: 9a7fa9b67e6b7b0ee7b43a56e0e18b10
Success: WordPress downloaded.
Real-World Scenarios
Scenario 1: Full fresh install pipeline
mkdir -p /var/www/html
cd /var/www/html
wp core download --locale=en_US
wp config create --dbname=mydb --dbuser=admin --dbpass=secret
wp db create
wp core install \
--url=https://example.com \
--title="My Site" \
--admin_user=admin \
--admin_password=Admin1234! \
--admin_email=admin@example.com
Scenario 2: Recover from a hacked core
# Backup DB first
wp db export backup_$(date +%Y%m%d).sql
# Re-download exact same version (do not upgrade during incident)
WP_VER=$(wp core version)
wp core download --version="${WP_VER}" --force
# Verify after recovery
wp core verify-checksums
Scenario 3: Test a beta or release candidate
wp core download --version=6.8-RC1 --force
Best Practices
- Download to the correct directory — always
cdto the WordPress root first. - Specify
--localefor non-English sites to get the correct language pack. - Use
--forceonly for recovery — routine updates should usewp core update. - Verify after download with
wp core verify-checksums.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
Error: WordPress files seem to already be present | Files already exist | Add --force if intended |
| Download fails | No internet / disk full | Check connectivity and disk space |
| MD5 mismatch warning | Corrupted download or wrong version | Re-run the command |
| Permission denied | Wrong user running WP-CLI | sudo -u www-data wp core download |
Quick Reference
wp core download # Latest, English
wp core download --locale=id_ID # Indonesian version
wp core download --version=6.4.3 # Specific version
wp core download --path=/var/www/mysite # Custom path
wp core download --force # Overwrite existing files
Next Steps
wp config create— createwp-config.phpafter download.wp core install— run the WordPress installation.wp core verify-checksums— verify the downloaded files.