Option 1 — Reinstalling in the WordPress dashboard
You can reinstall your core files in the WordPress dashboard if you are still able to log in.
- Log into your WordPress site at example.com/wp-login.php.
- Navigate to the Dashboard > Updates page.
- On the next page, click the Re-install version x.x.x button.
Option 3 — Reinstalling using wp-cli
wp-cli is a command-line tool you can use to manage your WordPress site. The following example uses the –skip-content option to download WordPress without the default themes and plugins.
- Log into your site via SSH.
- Navigate into your website directory. Make sure to change the username to your Shell user.
[chserver]$ cd /home/username/example.com
- Run the following command to download your core files.
[chserver]$ wp core download --skip-content --force