Skip to content

How to Reinstall WordPress Core Files

There are cases where you may wish to reinstall WordPress core files, such as when you’ve made custom changes to the standard WordPress core files or when you believe your website may be compromised.

In the Hawk Host cPanel, we provide a WordPress Management interface that makes it easy to perform a variety of functions you typically run using the WP-CLI.

  1. Log in to cPanel and search for WordPress Management:

  2. Click on WordPress Management to open the dashboard:

    Searching for WordPress Management in cPanel

  3. Once there, you’ll see a list of your WordPress installations. On the interface you’ll see an option Check WordPress Integrity

    WordPress Management check integrity option

  4. On the Check WordPress Integrity pop-up, there will be a Reinstall WordPress Core option which you can click to reinstall the WordPress core files.

    Check WordPress Integrity popup

  5. You will be prompted to confirm the reinstallation. Click Reinstall WordPress Core to proceed.

    Confirm reinstallation

  6. You will see a confirmation message that the WordPress core files have been reinstalled when the process is complete.

    Reinstallation complete

To use the WP-CLI method, you will to either use the WP-CLI method on the WordPress Management page in cPanel or use SSH to access your account.

  1. Navigate to the location of your WordPress installation.

  2. Run the following command to reinstall the WordPress core files:

    Terminal window
    wp core download --skip-content --force
  3. Expected Output

    Terminal window
    Downloading WordPress 7.0.2 (en_US)...
    md5 hash verified: 3ed26b59ad663f6378960916a2440043
    Success: WordPress downloaded.
    [wptoolkitdemo@el8testing public_html]$

    Keep in mind that the md5 hash will be different for each version of WordPress.

It is also a good idea to run wp core update-db after reinstalling the WordPress core files to ensure your database is up to date.

  1. Navigate to the location of your WordPress installation.

  2. Run the following command to update the WordPress database:

    Terminal window
    wp core update-db
  3. Expected Output

    Terminal window
    Success: WordPress database already at latest db version 61833.

WordPress Hosting Made Easy

Fast NVMe Storage • Free Migrations • 24/7 Expert Support

Explore our WordPress Plans