How to Manually Delete or Reset WordPress and Multisite
Don’t have access to your WordPress admin? Or can’t access the settings for a plugins? Don’t sweat it – you can still reset or delete and uninstall WordPress or your plugin manually.
There are many situations where you may need to rewind and go with a manual uninstall, such as if you’re testing new features out on your install, want to start from scratch, or you’re locked out because your site was hacked.
Sometimes, hitting the reset button is the easiest and best option.
Here’s how to manually delete or reset single or Multisite installations of WordPress using cPanel and MySQL.
Other Possible Solutions
Deleting your site and starting fresh can be the best option in some cases, but not always. In many cases, there are other more suitable solutions you should try.
Deleting or resetting manually means you’re going to lose everything you’ve uploaded, the themes, plugins and scripts you’ve installed, along with all the customizations you’ve made. If you’re even a little squeamish after reading that last sentence, then you should consider your other options first before reading on (but read on anyway!).
If you try everything else and you’re unsuccessful, then by all means, delete your site. On the other hand, you may be entirely certain that deleting your site is the best way to go, especially if you just wanted to test out a new version of WordPress. In that case, go ahead if you’re sure.
Recovering a Hacked Site
You may find that your site has been hacked and you want to clean it up while also trying to save all or as much of your site in the process. In such a case, we’ve got some super useful tutorials that can help you recover your site:
- Give Hackers the Smack-Down with Defender
- How to Scan Your WordPress Site and Patch Security Vulnerabilities
- Help, I’ve Been Hacked! How to Troubleshoot and Fix a WordPress Site
- Getting Constantly Hacked? How to Stop WordPress Backdoor Exploits for Good
- Hacked? How to Get Back Into the WordPress Admin
- Hacked? How to Clean Your Site and Get Off Google’s Blacklist
- How I Cleaned Up My WordPress Site After It Was Hacked and Blacklisted
You can also scan your site for compromised files and clean it up quickly and easily with our security plugin called Defender. While there are many security plugins out there, Defender is a piece of cake to use and its intuitive interface means you can scan and clean your site quicker than most other options.
If you’re running WordPress Multisite, but you want to go back to the days before you created your network, deleting or resetting your entire Multisite isn’t going to do the trick. Instead, check out our post How to Uninstall WordPress Multisite for details on how to revert to a single install of WordPress.
Testing and Staging Sites
It may also be worth mentioning that there are ways to do bug or feature testing without needing to create another installation of WordPress. You can use the Cloner plugin for networks to make a copy of your site where you can test all you want without ruining your public-facing site. There are details on using Cloner for testing in our post Quick and Reliable Bug Testing with Cloner for WordPress Multisite.
You can also use Cloner to create a private staging site as well if this is what you would prefer. You can check out How to Set Up a Staging Environment for WordPress with Cloner for details on how to set it up.
Backup and Restore
Possibly the easiest way to start fresh without losing anything on your site is to restore it from a backup. If you don’t have a backup available, then it’s a good time to think about starting to regularly backup your site.
It’s a whole lot easier to restore your site in a single click with Snapshot Pro rather than having to go through hoops and spend hours trying to fix everything. You can check out How to Backup Your WordPress Website (and Multisite) Using Snapshot for details on lightning-fast backups and restores.
Deleting WordPress or Multisite
If you’re ready to get rid of everything in its entirety, then you need to delete your site’s files and database. Though, the tricky part could be knowing which database to delete.
You can take a look at all your database credentials to jog your memory by accessing your wp-config.php file in the root of your site’s files.
In cPanel, go to Files > File Manager and navigate to your site. You should see a file listed among the wp-admin, wp-content and wp-includes folders called wp-config.php. Click on it, then on the Edit button at the top of the File Manager.
Locate the following code within the file:
Keep in mind, that it should look a bit different for you. The
database_name_here portion would list your actual database name,
username_here would display your database’s username and
password_here would list your real database’s password.
You can use this information to access your database later on so it may be helpful to make a note of this information or backup your site before continuing.
Exit out of the editor and make sure you’re still seeing a list of your site’s files, then select the entire list by clicking on the Select All button displayed directly above your listed files and folder.
Next, click the Delete button toward the top of the page. Click Confirm in the pop-up that appears to delete everything.
If your site and all its files are located in a directory, you can click on its folder name, then on the delete button. Selecting all the files is usually only necessary if your site is located in the root of your account.
Keep in mind that if your site is located in the root, there may be other files and folders on the list that you may not want to delete. In such a case, you can select the WordPress files and folders only, then delete them.
Even if WordPress was installed in a directory, you may still have files you would rather not delete so it’s best to double check beforehand to be on the safe side.
If you would prefer, you can also delete your files using FTP. For details on how to do this, check out How to Use FTP Properly with WordPress.
Now, you can head back to cPanel and click Databases > MySQL Databases. Find your database listed under the current databases section. You can refer to the database details you found in your wp-config.php file for this information.
Select your database name, then click the Delete button to completely remove it.
You should be prompted on the next page to confirm that you want to permanently delete the database. Click the Delete Database button to remove it. You won’t be able to recover it unless you have a backup so make sure you’re confident you want to delete your database before confirming.
1.6 million WordPress Superheroes read and trust our blog. Join them and get daily posts delivered to your inbox - free!
Once that’s done, your WordPress site or network has been completely deleted.
Resetting Your Site
You can also choose to manually reset your site if you’re not keen on just deleting it. You’ll be able to start all over with a fresh and clean site. You can do this in much the same way as you would when deleting your site, but there are a few key differences.
You don’t need to delete all your WordPress files as shown above. Instead, you can optionally delete the folders for the individual plugins and themes, the content in your uploads folder as well as any other custom scripts you uploaded that you don’t want to include in your new site.
It’s important that you keep your other core files intact, especially the wp-config.php file.
In the File Manager, navigate to your site, then to /wp-content/themes/. Select the folders of the themes you want to delete, then click the Delete button at the top of the page. Don’t forget to confirm your choice in the pop-up.
Keep in mind that it’s a good idea to keep at least one of the themes intact since your site needs to load something.
Next, go to /wp-content/plugins/ and delete and plugin folders you don’t want in the same way you did with your themes. You can also go to your /wp-content/uploads/ folder and delete the content you uploaded, though, you may decide you want to keep these.
Once that’s done, delete your database as described earlier and enter the same database name as the one you just deleted under the Create New Database heading. Click the Create Database button.
Refer to your wp-config.php file for this information if you don’t remember your database credentials.
Scroll down to the Add User to Database area and select your username and database from the drop down lists, then click the Add button.
On the next page, select the All Privileges checkbox, then click the Make Changes button at the bottom of the page.
If you don’t see the correct username listed, you can go ahead and create a new username, but with the same name as the one you deleted. Go to the Add New User section and enter the username and password of the database you deleted, then click the Create User button.
Once that’s done, you can complete the previous step and add the newly created user to your database.
For the final stretch, you need to run the WordPress install script by entering www.your-site.com/wp-admin/install.php into your browser’s address bar. Don’t forget to replace www.your-site.com with your actual domain and path to your site.
Choose your language and on the next page, fill in the essential login details for your site along with the title and your email. Click Install WordPress at the bottom of the page to finish up.
You can now log in to your new site and start over since it’s fresh as a daisy.
Re-Installing WordPress or Multisite
You can certainly delete or uninstall your WordPress site with many of the plugins and auto uninstallers available out there such as Softaculous, but it’s not always possible to use these methods, especially if your site has been hacked or you’re locked out of your account.
These steps should get you going if you do find that you can’t use a tool to delete or reset your site for you.
While it’s not always possible, if you’re able to use a plugin to reset your site, that’s the best option since it’s a lot quicker and easier. You can check out one of our other posts How to Reset Your WordPress Website for details on how to make it happen.
Once you delete your database, you can also choose to re-install WordPress rather than reset it and you can check out A Guide to the Best Ways to Install WordPress for details on the best re-installation methods.