Use WP-CLI to reinstall WordPress core when you have SSH access and need a clean, controlled repair. Use the WordPress Dashboard when the admin area still works and you need the safer, simpler option. WordPress powers about 43% of all websites, so core file problems are common enough that every site owner should know both methods [source: W3Techs].
TLDR: WP-CLI is faster, cleaner, and better for developers or site owners managing several websites. The Dashboard method is easier, but it depends on wp-admin still loading. For example, if an agency manages 40 client sites, WP-CLI can reinstall core files across them in minutes with a repeatable command. If one small business site has a broken “Update” screen, though, the Dashboard method may be enough.
What “Reinstalling WordPress Core” Actually Means
Reinstalling WordPress core replaces the main WordPress system files. It does not normally delete your posts, pages, themes, plugins, uploads, or database content. Those live in separate places.
Core files include folders and files such as:
wp-adminwp-includes- Most root WordPress files, such as
wp-login.phpandwp-settings.php
The key exception is wp-config.php. A proper reinstall should not overwrite it. Your wp-content folder should also stay untouched, since it contains themes, plugins, and media.
You might reinstall core files after a failed update, missing files, a suspicious file change, white screen errors, or broken admin behavior. It can also help after malware cleanup, though it is not a full security fix by itself.
Before You Use Either Method
Do not skip the backup. Seriously. It drives me crazy that so many “quick fixes” start by clicking buttons on a live site with no rollback plan.
Before reinstalling WordPress, take these steps:
- Back up the database. This protects posts, settings, orders, users, and comments.
- Back up files. At minimum, save
wp-contentandwp-config.php. - Check the WordPress version. Reinstall the same version unless you are also planning an update.
- Use maintenance mode if the site receives live traffic or orders.
- Confirm access. Make sure you can use hosting file manager, SFTP, or SSH if something goes wrong.
If the site runs WooCommerce, membership tools, bookings, or paid ads traffic, schedule the work during a quiet period. A five-minute repair can still become a thirty-minute recovery if permissions or caching misbehave.
Method 1: Reinstall WordPress Core with WP-CLI
WP-CLI is the command-line tool for WordPress. It lets you manage WordPress from SSH instead of clicking through the admin panel. For core reinstalls, it is usually the more professional option.
The standard command is:
wp core download --force
This downloads a fresh copy of WordPress core and overwrites existing core files. The --force flag tells WP-CLI to replace files that are already present.
If you need a specific version, use:
wp core download --version=6.6.2 --force
If your WordPress files are not in the current terminal directory, add the path:
wp core download --path=/home/account/public_html --force
You can check the installed version first:
wp core version
WP-CLI is documented by the WordPress project and is widely used by hosts, agencies, and developers [source: WordPress Developer Resources].
When WP-CLI Is the Better Choice
- The admin dashboard is broken. If wp-admin will not load, WP-CLI still may work.
- You manage many sites. Commands are repeatable and easy to document.
- You need speed. A reinstall can take seconds after SSH login.
- You want fewer browser issues. No timeout screens. No half-loaded update page.
- You are repairing hacked core files. Clean replacement is more reliable than guessing which files changed.
The catch is that WP-CLI requires SSH access and some comfort with the terminal. On cheap shared hosting, SSH may be disabled or limited. In that case, the Dashboard method may be easier.
WP-CLI Pros and Cons
Pros:
- Fast and precise.
- Works even when the Dashboard is partly broken.
- Good for automation and repeat repairs.
- Can target a specific version.
Cons:
- Requires SSH access.
- A wrong path can waste time or affect the wrong install.
- Less friendly for non-technical users.
- Server permissions can block file replacement.
Method 2: Reinstall WordPress Core from the Dashboard
The WordPress Dashboard method is simple. Go to:
Dashboard > Updates
Then click Re-install version. WordPress will download and reinstall the current core version.
This is the best method when the admin area works, the site is not in crisis, and you do not have SSH access. It is also easier for site owners who only need a clean refresh after a failed update.
When the Dashboard Method Makes Sense
- You can log in normally. The admin panel loads without fatal errors.
- You prefer a visual interface. No terminal commands needed.
- You are working on one site. There is no need for automation.
- Your host blocks SSH. Many low-cost plans do this.
Honestly, it feels like this method should be enough more often. But browser-based updates can fail because of timeouts, memory limits, file ownership issues, or security plugins that interfere at the worst possible moment.
Dashboard Pros and Cons
Pros:
- Easy for most users.
- No command line required.
- Built into WordPress.
- Works well for routine reinstalls.
Cons:
- Requires working wp-admin access.
- Can fail during server timeouts.
- Less useful for bulk site management.
- Gives less control over version and process.
What Reinstalling Core Will Not Fix
A core reinstall is useful, but it is not magic. It will not repair a bad plugin, a broken theme, corrupt database tables, or a damaged .htaccess file. It also will not remove malware hidden inside wp-content.
If the site is hacked, reinstalling core should be only one step. You should also:
- Scan themes and plugins.
- Replace infected premium plugin files from official sources.
- Reset admin passwords.
- Check unknown users.
- Review file permissions.
- Update salts in
wp-config.php.
WP-CLI vs Dashboard: Which Should You Choose?
Choose WP-CLI if you have SSH access, need speed, or are working on a broken site. It is the stronger method for agencies, developers, and serious maintenance work.
Choose the Dashboard if the site is stable and you want the least technical route. It is fine for a single site with normal admin access.
For a business website, my usual order is clear: backup first, WP-CLI second, Dashboard only if SSH is not available. That approach gives you more control and fewer surprises.
Final Recommendation
If your site is still accessible and low-risk, the Dashboard reinstall is acceptable. It is quick and familiar. If the site is broken, infected, or part of a larger maintenance workflow, use WP-CLI.
The safest process is simple: back up, confirm the install path, reinstall core, clear cache, then test login, forms, checkout, search, and key pages. A clean WordPress core reinstall should feel boring. That is the goal.