↑ ↓ select, Enter open, Esc close

Update WordPress core including the database

Caution: This command changes the system. Understand what it does before you run it.

Adjust the values, the command updates live
user@server
wp core update --path=/var/www/vhosts/example.com/httpdocs && wp core update-db --path=/var/www/vhosts/example.com/httpdocs

Downloads the current WordPress version, replaces the core files and then updates the database schema. Handy when the dashboard is unreachable or when many installations need to be updated by script. Check the current version with wp core version and available updates with wp core check-update beforehand.

Note: Create a database backup with wp db export first. With --minor, only maintenance releases are installed.

Also searched as

  • update wordpress from command line
  • upgrade wordpress to latest version
  • update wordpress without dashboard

Related one-liners

All in WP-CLI

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.