Reinstall WordPress: WP-CLI vs WordPress Dashboard for Restoring WordPress Core Files

by Liam Thompson
0 comment

Use WP-CLI if you have server access and need a clean, fast restore of WordPress core files; use the WordPress Dashboard if the admin area still works and the issue is minor. WordPress powers around 43% of all websites, so broken core files are not rare at all [source: W3Techs]. A failed update, malware cleanup, bad file permissions, or an interrupted upload can leave key files missing or changed. Reinstalling WordPress core replaces those system files without touching your posts, pages, media library, themes, or plugins.

TLDR: WP-CLI is usually the better choice for restoring WordPress core files because it is faster, scriptable, and works even when the Dashboard is broken. For example, if an agency manages 25 client sites, running a verified core reinstall by command line can turn a 2-hour cleanup session into a 20-minute task. The Dashboard is simpler for beginners, but it depends on a working admin area. If wp-admin throws a white screen or a 500 error, WP-CLI wins.

What “reinstalling WordPress” actually means

Reinstalling WordPress core does not mean deleting your whole site and starting again. In most cases, it means replacing the official WordPress files in the root directory and the wp-admin and wp-includes folders.

Your content usually lives elsewhere:

  • Posts, pages, users, and settings are stored in the database.
  • Images and uploads are stored in wp-content/uploads.
  • Themes are stored in wp-content/themes.
  • Plugins are stored in wp-content/plugins.
  • Your main config file is wp-config.php.

That said, do not get casual with this. Make a full backup first. A core reinstall is safe when done right, but one bad delete command can turn a cleanup into a support ticket nobody wants.

When the WordPress Dashboard makes sense

The Dashboard method is the friendly option. Go to Dashboard > Updates, then click Re-install version. WordPress downloads a fresh copy of the current version and replaces its own core files.

This works well when:

  • You can still log in to wp-admin.
  • The site has a minor file issue after an update.
  • You are not comfortable with SSH.
  • You only manage one or two websites.
  • You want the lowest-risk path with the least technical work.

The Dashboard is also useful for site owners who do not know where their hosting file manager lives. It is simple, visible, and hard to mess up. Click a button, wait a bit, done.

The annoying part is that the Dashboard method needs WordPress to be healthy enough to run the Dashboard. That feels backwards when the problem is WordPress itself. If the admin panel is blank, locked, infected, or throwing errors, the button you need may as well not exist.

When WP-CLI is the better tool

WP-CLI is the command-line tool for managing WordPress. It lets you run update, install, repair, and verification tasks through SSH. If you manage sites regularly, it feels like taking the training wheels off.

A common core restore workflow looks like this:

wp core verify-checksums
wp core download --force
wp core verify-checksums

The first command checks whether WordPress core files match the official release. The second command downloads fresh core files and overwrites existing ones. The final check confirms that the replacement worked. The checksum command is documented by WP-CLI and is one of the cleanest ways to spot changed core files [source: WP-CLI].

WP-CLI is best when:

  • The Dashboard is broken. You do not need wp-admin to load.
  • You manage many sites. Commands can be repeated quickly.
  • You need proof. Checksum results show what changed.
  • You are cleaning malware. Core file tampering is easier to detect.
  • You want speed. No clicking through slow admin screens.

Expect to waste time on tiny hosting quirks, though. Some shared hosts block SSH, limit memory, or ship an old PHP version that makes WP-CLI complain. It drives me crazy that a one-line restore can become a 15-minute hosting panel hunt because SSH access is hidden under three menus.

WP-CLI vs Dashboard: the practical comparison

Factor WP-CLI WordPress Dashboard
Speed Very fast, often under a minute Fast, but depends on admin performance
Skill needed Requires SSH and command basics Beginner friendly
Works if admin is broken? Yes No
Good for bulk work? Yes No
Verification Strong with checksums Limited visibility

The Dashboard is a good repair button. WP-CLI is a proper repair kit. That difference matters when you are fixing more than one site or trying to confirm that no core files were modified.

What WP-CLI should not replace

WP-CLI is powerful, but it does not replace a full cleanup plan. If a site was hacked, reinstalling core files is only one step. You still need to inspect users, plugins, themes, uploads, cron jobs, and the database.

For example, a hacked site may have clean core files but a malicious plugin file in wp-content/plugins. Or it may hide spam links inside database options. Reinstalling core will not remove those.

Use this basic order for safer recovery:

  1. Put the site in maintenance mode if traffic is active.
  2. Take a full backup, even if the site is broken.
  3. Verify core files with WP-CLI if possible.
  4. Reinstall WordPress core using WP-CLI or Dashboard.
  5. Update plugins and themes from trusted sources.
  6. Change admin and hosting passwords.
  7. Scan the site again before calling it fixed.

Which method should you choose?

Choose the WordPress Dashboard if you are a solo site owner, your admin area works, and you only need a quick refresh of the current WordPress version. It is simple and safe for routine fixes.

Choose WP-CLI if you have SSH access, the Dashboard is failing, or you need a cleaner way to verify file integrity. It is also the better choice for developers, support teams, and agencies managing repeated repairs.

Final recommendation

For serious restoration work, WP-CLI should be your first choice. It is faster, clearer, and more useful when WordPress is too damaged to operate from the admin screen. The Dashboard still has a place, especially for simple reinstalls, but it is limited by the one thing you may not have: a working Dashboard.

If you are unsure, use this rule: if wp-admin loads, the Dashboard is fine; if wp-admin fails, use WP-CLI. And before either method, make a backup. That part is not exciting, but it is what saves you when a small repair turns into a bigger mess.

Related Posts