November 1, 2020

How to reinstall WordPress via WP-CLI

You can easily reinstall WordPress on an existing site using WP-CLI with this command:

wp core download --skip-content --force

It’s important to note the two parameters:

[–skip-content]: Download WP without the default themes and plugins.
[–force]: Overwrites existing files, if present. We want this in order to overwrite any corrupted or infected files.

Read more: wp core download – WP-CLI