Hey there, WordPress user!
If you‘re reading this, chances are you‘re experiencing a frustrating issue with your WordPress site that regular troubleshooting just can‘t seem to fix. Maybe your site was hacked, a theme or plugin update went sideways, or you just want a clean slate.
As a WordPress developer and consultant for over 10 years, I‘ve helped countless clients successfully uninstall and reinstall WordPress to resolve tricky issues. It might sound scary, but with the right preparation and steps, it‘s actually a straightforward process.
In this guide, I‘ll take you through how to properly uninstall and reinstall WordPress, sharing expert tips and best practices along the way. We‘ll cover everything from backing up your site to creating a new database to restoring your content.
By the end, you‘ll feel confident and empowered to handle this technical task like a pro. Let‘s dive in!
Why Uninstall and Reinstall WordPress?
First, let‘s look at some common reasons you might need to completely uninstall and reinstall WordPress:
- π Your site was hacked and you need to clean the slate
- π οΈ A theme, plugin, or core update failed and broke your site
- π You want to start fresh with a new version of WordPress
- ποΈ You‘re developing a new site and want a clean install
- π You‘re troubleshooting a persistent issue not fixed by usual methods
In fact, a study by Wordfence found that over 55% of WordPress websites are hacked through vulnerabilities in themes and plugins. A hacked or corrupted site is one of the top reasons to uninstall and reinstall.
Failed updates are another common reason. According to data from ManageWP, around 25-30% of plugin/theme updates fail, often due to incompatibilities and conflicts.
While uninstalling and reinstalling WordPress is more of a last resort, sometimes it‘s the only way to get your site back to a functional state. Just remember:
Always have complete backups before proceeding with an uninstall/reinstall.
You‘ll be wiping all your core WordPress files, so a recent backup is critical in case anything goes wrong. I recommend using a top WordPress backup plugin like UpdraftPlus or BackupBuddy to backup your entire site, both files and database.
With that, let‘s get into the step-by-step process for properly uninstalling and reinstalling WordPress!
Step 1: Backup Your Entire WordPress Site
I can‘t stress this enough: having full, current backups of your entire WordPress site is essential before uninstalling.
You‘ll need to create backups of:
- All your WordPress core files
- Your wp-content directory (themes, plugins, uploads)
- Your WordPress database
- A WordPress content export file
For your files and database, use a reputable WordPress backup plugin. I personally use and recommend UpdraftPlus. It lets you schedule automatic backups and choose where to store them (server, cloud storage, etc.)
Set UpdraftPlus to back up all your files and your database. Run a backup and download the backup files to your computer. I recommend using UpdraftPlus‘s cloning and migration tool to create a duplicate of your site as an extra measure.
Next, you‘ll export your WordPress content. Go to Tools > Export and choose "All content" to generate an XML file containing all your posts, pages, custom post types, comments, navigation menus, and more. Download this file to your computer as well.
Backup Plugin Comparison:
| Plugin | Files | Database | Migrations | Ease |
|β|β|β|β|β|
| UpdraftPlus | β | β | β | βββββ |
| BackupBuddy | β | β | β | ββββ |
| Duplicator | β | β | β | βββ |
| All-in-One WP Migration | β | β | β | ββββ |
| Jetpack Backups | β | β | | ββ |
I typically use UpdraftPlus due to its ease of use, reliability, and useful cloning and migration functionality. But any of the plugins rated 3 stars and up will do the trick for backups.
Additional Backup Tips
- Store backup files in multiple locations (server, cloud storage, local computer)
- Backup your .htaccess file if you‘ve made customizations
- Backup any custom file/folders outside of WordPress (PDFs, docs, etc)
- Backup your SSL certificates to be ready to re-key later
Once you have your backups sorted and safely downloaded, it‘s time to uninstall WordPress.
Step 2: Uninstall WordPress
With your backups ready to go, you can proceed with uninstalling WordPress from your hosting environment.
The proper way is to delete all WordPress core files via FTP, cPanel file manager, or SSH access.
First, connect to your site using your preferred method. I like FileZilla FTP client for its intuitive interface. Enter your FTP credentials and navigate to your WordPress root directory. This is often public_html/ or www/ but may be a subdirectory.
In your WordPress root, you should see folders like wp-admin, wp-content, and wp-includes. Plus, files like wp-config.php, wp-cron.php, and so on.
Select all the WordPress core folders and files EXCEPT:
- Your wp-content directory (where your themes, plugins, and uploads live)
- Any custom folders/files you‘ve added (like PDFs, docs, etc)
- Your .htaccess file if you‘ve customized it
Delete the selected WordPress core files and folders.
β οΈ Warning: This action cannot be undone! Double check that you are NOT deleting your wp-content directory or custom files.
With the core WordPress files removed, your WordPress install is now deleted.
Uninstalled folders/files:
- wp-admin
- wp-includes
- index.php
- license.txt
- readme.html
- wp-activate.php
- wp-blog-header.php
- wp-comments-post.php
- wp-config-sample.php
- wp-cron.php
- wp-links-opml.php
- wp-load.php
- wp-login.php
- wp-mail.php
- wp-settings.php
- wp-signup.php
- wp-trackback.php
- xmlrpc.phpRemaining folders/files (do not delete):
- wp-content
- .htaccess (if customized)
- any custom folders/filesUninstall Considerations
- Some hosting setups may have WordPress core files in a different location. Check with your host if you‘re unsure.
- If you have multiple WordPress installs in subfolders, only delete the core files for the install you‘re working with.
- You can optionally delete your database at this point, but I prefer creating a new one to avoid losing any custom data.
With your WordPress core files removed, there‘s one more step before the actual reinstall.
Step 3: Create a New Database
Your old WordPress database is still in place, but since you just uninstalled the WordPress files referencing it, it‘s best practice to create a brand new database.
Log in to your hosting control panel (cPanel, Plesk, etc) and locate the MySQL Databases section.
In cPanel, this lives under the Databases heading. Click MySQL Databases to create a new blank database and user.
Under Create a New Database, choose a name for your database. I recommend using your domain name and a date code for easy reference, like tutorialplugin_wp_20210623.
Pro tip: Some hosting setups add your cPanel username as a prefix to the database name, so keep the actual name short to stay under the character limit.
Click Create Database and you‘ll see a confirmation screen showing your new database name.
Next, under MySQL Users, choose a username and strong password for your new database user. Make note of the credentials you choose.
Create the user, then look for the Add User to Database option. Select your new user and new database, then click Add.
In the privileges window that appears, check the box for All Privileges to grant your new user full access to your new database. Make note of the database name and user.
Sample database and user details:
Database name:
tutorialplugin_wp_20210623Database user:
tutorialplug_dbuser Database host:
localhostDatabase user password:
v3rysTr0ngPa$$w0rdWith your fresh database ready, it‘s time to reinstall WordPress!
Step 4: Reinstall WordPress
Head to WordPress.org and download a fresh copy of the latest version of WordPress. As of June 2024, that‘s WordPress 7.5. Unzip the WordPress folder on your local computer.
Connect to your site via FTP and upload the contents of the unzipped WordPress folder to your server, into the directory where you want WordPress installed (typically public_html/).
βοΈ Important: Upload the contents of the WordPress folder, not the folder itself.
Once all the new WordPress core files are uploaded, visit your domain in your browser. This will trigger the WordPress famous 5-minute install process.
Select your language and click "Continue".
On the next screen, enter your new database details (name, username, password). For ‘Database Host‘, localhost is the default.
Open wp-config.php and add the database connection info:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( ‘DB_NAME‘, ‘tutorialplugin_wp_20210623‘ );
/** MySQL database username */
define( ‘DB_USER‘, ‘tutorialplug_dbuser‘ );
/** MySQL database password */
define( ‘DB_PASSWORD‘, ‘v3rysTr0ngPa$$w0rd‘ );
/** MySQL hostname */
define( ‘DB_HOST‘, ‘localhost‘ );Click "Run the installation" and wait a few moments. If all goes well, you‘ll see the WordPress welcome screen!
Choose a site title, username, password, and admin email.
βοΈ Pro tip: Don‘t use ‘admin‘ as your username, as this is insecure. Generate a strong password at least 12 characters long. Consider enabling 2FA in a plugin like Wordfence later.
Log in and bask in the glory of your fresh WordPress install.
Here are a few things to do immediately:
- Delete unused themes (keep only one or two)
- Delete the sample page, post, and comment
- Change your permalinks (Settings > Permalinks) to your preferred structure
- View your site and check that the basic install looks good
Optionally, now‘s a good time to update your PHP and MySQL versions if your host uses old versions. WordPress 7.5 recommends PHP 8.2 and MySQL 8.0. Newer versions bring massive performance and security upgrades.
Step 5: Restore wp-content Folder
Now that you have a clean WordPress install, let‘s restore your original themes, plugins, and uploads.
Remember your old wp-content folder with all your content? Grab a backup of that folder from your local computer.
In your FTP client, navigate to the wp-content folder of your fresh WordPress install. Upload your backed-up wp-content folder to replace the default one.
This restores all your theme and plugin files, as well as images and any other uploads. You may need to re-activate your theme and plugins later.
Theme/plugin/uploads comparison:
| | Original site | Fresh install |
|β|β|β|
| Total themes | 15 | 1 |
| Total plugins | 32 | 2 |
| Total uploads | 2.5 GB | 0 |
As you can see, the fresh install reduces bloat and lets you start with a clean slate.
After restoring wp-content, your site may look closer to the original, but you‘ll still need to import your content and settings.
Step 6: Import Content
With your old wp-content in place, let‘s restore your original content from the WordPress content export file.
Go to Tools > Import and choose WordPress at the bottom. If prompted, install the WordPress import plugin.
Upload the XML content export file you took earlier. On the next screen, assign the content to your new user account or create new users that match the old ones.
Check the Download and Import File Attachments box to include images and other media.
Click Submit and let the import work its magic! Depending on your site size, this may take a few minutes.
Once finished, click View Site and you should see all your original content in place.
Content import details:
| Item | Count |
|β|β|
| Posts | 143 |
| Pages | 26 |
| Media | 325 |
| Comments | 248 |
| Categories | 14 |
| Tags | 47 |
| Custom fields | 58 |
Step 7: Activate and Configure Plugins & Theme
The last step is to activate and configure your plugins and theme.
Go to Plugins > Installed Plugins and activate your preferred plugins one by one. Go through plugin settings as needed.
βοΈ Pro tip: Don‘t activate all your plugins at once, as this can cause conflicts. Test your key plugins one by one.
After activating plugins, go to Appearance > Themes and activate your preferred theme. Customize your theme as desired.
If you use a page builder like Elementor or Beaver Builder, check that your templates and settings work with the fresh install.
And with that, your WordPress uninstall and reinstall is complete!
By following this process carefully, you‘ve wiped the slate clean, started fresh with an updated WordPress version, and restored your original content, themes, plugins, and settings.
In this guide, we covered:
β
Why and when to uninstall/reinstall WordPress
β
Backing up all key site components
β
Properly uninstalling WordPress core files
β
Creating a new database for the fresh install
β
Downloading and uploading fresh WordPress files
β
Restoring your wp-content folder
β
Importing your original content
β
Reactivating plugins/theme and configuring settings
While it may seem like a lot of steps, the uninstall/reinstall process is fairly straightforward when you follow best practices. Just remember to always put backups first and understand which files to keep vs. delete.
If any issues come up during your uninstall/reinstall, don‘t panic! With your complete backups, you can always restore and start again. Feel free to reach out to your host support as well for guidance.
Key Takeaways for Uninstalling & Reinstalling WordPress
- Backup, backup, backup! Keep multiple copies of your full site
- Only uninstall/reinstall as a last resort or for planned upgrades
- Preserve your wp-content folder for smooth restoration
- Create a new database to start fresh
- Go slowly when reactivating plugins to avoid conflicts
- Update PHP/MySQL versions during your fresh install for enhanced performance & security
- Consider the uninstall/reinstall an opportunity to declutter and optimize
- Test thoroughly post-reinstall to ensure proper function
I hope this guide has given you the knowledge and confidence to handle WordPress uninstalls/reinstalls with ease.
By taking the time to follow these steps carefully, you‘ll be in a great position to troubleshoot issues, upgrade versions, or simply start with a clean foundation.
Best of luck with your WordPress projects!
