As experienced WordPress administrators who've assisted thousands of sites through tough troubleshooting, we often recommend a full core reinstall as a last resort. One user recently asked how to properly uninstall and reinstall WordPress when standard fixes fall short. This step-by-step guide ensures you preserve all content, media, and SEO rankings.

Reinstalling WordPress core files should always be your final option. Most common errors—like white screen of death or plugin conflicts—are quickly resolved with basic troubleshooting. Check our comprehensive WordPress troubleshooting guide first to pinpoint and fix the issue.
For hacked sites, follow our proven guide to cleaning a hacked WordPress site. Only proceed to reinstall if nothing else works.
Before touching anything, back up your entire site using a reliable plugin like UpdraftPlus or Duplicator. Download backups to your computer or cloud storage such as Google Drive or Dropbox. This safety net covers unexpected issues—we've seen it save sites countless times.
Generate a WordPress export file containing all posts, pages, categories, tags, and comments. This method skips plugin-generated data for a clean restore.
Log in to your admin dashboard, navigate to Tools » Export, select "All content," and click "Download Export File."

For sites with many users, export them too—see our guide on importing/exporting WordPress users.
Your themes, plugins, images, and uploads live in the /wp-content/ folder. Download it via FTP (like FileZilla) or cPanel File Manager for later restoration.

With wp-content secured, you're set to remove core files.
Using FTP or cPanel File Manager, delete all WordPress files except the wp-content folder (already backed up) and wp-config.php if customized.
Skip deleting your database—instead, create a fresh one. Log in to cPanel, click "MySQL Databases."

Add a new database name and create it.

In "MySQL Users," create a new user with a strong password.

Under "Add User to Database," assign the user to your new database and grant all privileges.

Click "Add." Your new database is ready.
Download the latest WordPress from WordPress.org.

Unzip and upload files via FTP to your site's root.

Visit your site to start installation. Enter your new database details (host: usually localhost).

Click Submit. On success:

Fill site title, admin email, and password.

Click "Install WordPress." Log in, then delete default "Hello World" post, sample page, and comment.
Via FTP, upload your backed-up /wp-content/uploads/ folder. Reupload custom theme folders from /wp-content/themes/ if modified.

Go to Tools » Import, install the WordPress importer, and run it. Upload your XML file.


Choose author handling and check "Download and import file attachments." Submit to import.

View your restored site.
Install and activate plugins individually, reconfiguring settings as needed. Rebuild menus, widgets, and forms to match your original setup.
Your site is now refreshed and fully restored. For ongoing protection, review our step-by-step WordPress security guide.