If you’re having issues with your WordPress site, one potential fix is to reinstall WordPress to make sure the issue isn’t caused by any corrupt files. Done right, this ensures you have clean core WordPress files without affecting your existing content. Or, if you want to restart your WordPress site from a completely blank slate, you might want to entirely nuke your existing WordPress site and reinstall a fresh copy of WordPress to start from scratch.
Whether you want to completely reinstall WordPress or just reinstall the core WordPress software without affecting your existing content, we’ve got you covered in this post.
The only thing we ask is that you take a backup before following any of these methods. Even though the first two methods are geared at helping you reinstall WordPress without losing any content, it’s always a good idea to have a fresh backup just in case something goes wrong! If you are a Kinsta client, you can quickly take a WordPress backup with a single-click.
Once you have your freshly taken backup in hand, click below to skip to your tutorial of choice:
- How to reinstall WordPress from the WordPress dashboard while preserving existing content
- How to manually reinstall WordPress via FTP while preserving existing content
- How to manually reinstall WordPress via WP-CLI while preserving existing content
- How to completely reinstall WordPress and start from a 100% blank slate
- How to reinstall WordPress themes or plugins
How To Reinstall WordPress While Preserving Existing Content
The following three methods show you how to reinstall the core WordPress software without affecting any of your existing:
- Content
- Themes
- Plugins
On a slightly more technical level, that means neither of these methods will affect your WordPress site’s:
- Database
- wp-config.php file
- wp-content folder
Each method only reinstalls the core WordPress software.
How To Reinstall WordPress Core Software Automatically From Your Dashboard
If you just want to reinstall the core WordPress files, you can actually do it right from your WordPress dashboard (if you can’t access your WordPress dashboard – you should skip ahead to the next section for how to do the same thing via FTP!).
It’s surprisingly simple. In your WordPress dashboard, go to Dashboard → Updates in the sidebar. Then, click the button to Re-install Now:
Once you click the button, WordPress will automatically download and reinstall the latest version of WordPress. You’re essentially just manually re-running the normal Update process that WordPress performs when you update WordPress from your dashboard.
It might take a few seconds – but once the process finishes, you should have a fresh copy of WordPress installed.
How to Reinstall WordPress Core Software Via FTP
If you can’t access your WordPress dashboard because of an error (or just prefer to work over FTP), you can perform a similar process via FTP. You’ll basically be manually duplicating what WordPress would otherwise do for you in the section above.
Here’s the process in a nutshell:
- Download the latest version of WordPress
- Extract the ZIP file
- Upload everything except the /wp-content/ folder
Let’s go through each step in a bit more detail…
First, head to WordPress.org and download the most recent version of WordPress:
Once the download finishes, extract the full contents of the ZIP file to your computer. Then, delete the wp-content folder.
Once you’ve done that, connect to your host via FTP and upload the remaining files to the folder where you originally installed WordPress. Usually, this is your root folder named something like public or public_html.
When you start uploading the files, your FTP program should prompt you with a message saying something similar to Target file already exists. When that happens, make sure to select the Overwrite option and continue:
Because you already deleted the wp-content folder, this will overwrite all of the core WordPress files without affecting any of your themes or plugins. Once the upload finishes, you should have a freshly installed copy of the WordPress core files and things are hopefully running smoothly.
How to Reinstall WordPress Core Via WP-CLI
You can also reinstall WordPress core using WP-CLI. WP-CLI is a command line tool for managing many-many aspects of a WordPress installation. It can add/remove users, posts, categories, insert test data, search and replace in the database, and much more. The following command would download WordPress core without the default themes and plugins.
wp core download --skip-content --force
Read more about WP-CLI commands.
How To Completely Uninstall And Reinstall WordPress
This method will not preserve any of your existing content. Do not follow it unless you want to completely obliterate your existing WordPress site. Basically, you’ll need to:
- Delete all of your existing WordPress files
- Install a fresh copy of WordPress using your desired method
If it sounds straightforward, that’s because it is! To delete all of your existing files, you can connect to your site via FTP or, if your host uses cPanel, via cPanel File Manager.
Select all the files in the folder where you installed WordPress and delete them:
You might also want to delete the existing database used for your WordPress site for cleanliness’ sake, though you can use a fresh database even if you skip deleting the existing database. If your host uses cPanel, you can delete your existing database from the MySQL Databases area in cPanel:
Otherwise, you can use phpMyAdmin to Drop the Database:
Once you’ve cleaned out the existing WordPress files, all you need to do is install a fresh copy of WordPress as you would with a brand new site. Depending on your host, you can do this:
- Via a one-click installer like Softaculous or Fantastico
- Manually using the famous 5-minute WordPress install
Once you finish installing a fresh copy of WordPress, you can start building your new site from an entirely blank slate. If you can’t login to your WordPress dashboard, read our guide on how you can change your password.
How To Reinstall WordPress Themes And Plugins
While the above methods dealt specifically with the WordPress core software, you may also run into situations where you need to reinstall specific themes or plugins on your site. Thankfully, this is pretty simple. Here’s the safest way to do so:
First, connect to your site via FTP and navigate to your wp-content folder. Then, depending on whether you want to reinstall a theme or a plugin, navigate into either the themes or the plugins folder:
Find the folder for the plugin or theme you want to reinstall. Then, rename that folder and append “_old” to the end of the original filename:
At this point, you can install a fresh copy of the theme or plugin like you normally would. It should function the same as before and retain all of your previous settings and configurations.
Once you verify that everything is working properly with the reinstalled version, you can go back to your FTP program and delete the old folder:
Final Thoughts
In the end, it’s fairly simple to reinstall WordPress. If you just want to reinstall the core WordPress software, you can do so by either:
- Using the built-in WordPress update functionality
- Re-uploading the latest copy of WordPress to your server, excluding the wp-content folder and wp-config-sample.php file.
And if you want to completely start from scratch, all you need to do is delete your existing:
- Files
- Database
And install a fresh copy of WordPress via whatever method you prefer. Finally, to reinstall a specific theme or plugin, all you need to do is rename the existing folder via FTP and install a fresh copy like you normally would.
Suggested reading: How to Install WordPress Locally.
Very complete and detailed guide!
Brian,
Im in the process of reinstalling WP, keeping the old data intact. I dont have access to the WP Dashboard, so Im doing everything manually, but I have some doubts: 1) Your instructions state that i must keep the wp-config-sample.php (I tought it was the wp-config.php, not the sample one). Whats in the sample php file that needs to be kept? 2) After several trials, using the same DB, username, password and prefix, I still cant be able to run the site again. Most of the time the error message is “too many redirections”. Any clue? Thanks
Hey Rafa,
We’ve updated the instructions above. WordPress.org doesn’t contain a wp-config.php file, so you don’t have to worry about that. And the wp-config-sample.php isn’t used.
A too many redirects error typically is caused by a browser issue, wrong site home URLs, or even perhaps an issue with redirects you already have setup (perhaps with a plugin?). Have you checked with your WordPress host? If it’s the ERR_TOO_MANY_REDIRECTS error than you might also want to check out our post on this: https://kinsta.com/blog/err_too_many_redirects/
Hey. My website just experienced a malware attack so i plan on doing an uninstall and reinstall. I have compared your method with that of others and I noticed you didn’t mention anything about exporting content. I hope following your method would not make me lose my post content, categories and user data.
Hey Toheeb. Many of the options above show how to reinstall WordPress while maintaining your existing content. Hopefully one will work for you!
Thanks for this info. I recently had problems with some plugins and folder permissions. I wanted to move content from original folder to another and keep same database so I did this:
-Renamed original “blog” folder to “blog2”
-created a new folder “blog”
-downloaded wordpress, replace “wp-config-sample.php” to “wp-config.php” and added old-same database credentials.
-Uploaded wordpress to “blog”, and copied/moved the uploads folder “blog2/wp-content/uploads” to “blog/wp-content/uploads” (move in ftp o filemanager is faster than copy) because in uploads where are all my images.
-Then moved my them from blog2 to blog, “wp-content/themes/customizr”
-I could copy the plugins too, but i just searched and installed every single one and i dont loose the config because was same database
-Aditional, if you cannot access a post. move any .htaccess from blog2/ to blog, or generated via wp-admin > settings > permalinks, just save and it will generated a new .htaccess
And that’s it.
Yes! You legend! You saved me from having to start my WordPress site from scratch. I had deleted or replaced a core file in the WordPress folder structure. Your simple solution of reinstalling WordPress from within the dashboard worked! I had tried for hours! Thank you! ^o^/
I was trying to fix my reblog button (followers told me it wasn’t working), then it was missing. I accidentally installed (re-installed) WordPress. My front page comes up, but when I click on ‘My Site’, it goes to a page telling me I don’t have a site yet! I have been on WordPress for six years.
So apparently I may have installed it over my blog site. Now I can not access, as I said, I get the ‘You don’t have a site yet. Ask if I want to create one. NO; I’d like my site back.
Did you try to restore the site from the latest backup?