Reinstall WordPress core files in an existing site

 

Overview

The instructions in this article reinstall the core WordPress files into your existing WordPress site. These steps assume your original WordPress files are still in your current website directory.

Complete the following before proceeding

Reinstalling WordPress core files

There are three options you can use to reinstall the WordPress core files.

These instructions only reinstall the core WordPress files, which do not include your themes, plugins, database, and wp-content folder. See these articles If you need to install a new copy of WordPress on an empty website instead.

Option 1 — Use the WordPress dashboard

You can reinstall your core files in the WordPress dashboard if you are still able to log in:

  1. Log in to your WordPress site at example.com/wp-login.php.
  2. Navigate to the Dashboard > Updates page.
  3. On the next page, click the Re-install version x.x.x button.

Option 2 — Use FTP

If you don't have access to your WordPress dashboard, you can upload and overwrite the files using an FTP client:

  1. Visit wordpress.org/download to download the WordPress .zip file to your computer.
  2. Unzip the file on your computer. This unpacks all of the WordPress files and directories.
  3. Within these files, delete the wp-content directory
  4. Log into your site using an FTP client.
  5. Upload all files and directories you just downloaded to your current site. When prompted, choose to overwrite the files on the server.

Option 3 — Use 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. You can read more about this command here.

  1. Log in to your site via SSH.
  2. Navigate into your website directory. Make sure to change the username to your Shell user:
    [server]$ cd /home/username/example.com
  3. Run the following command to download your core files:
    [server]$ wp core download --skip-content --force
    

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?