There are lots of people running multiple websites and left some of them halfway due to time constraint or failed to attract good traffic. In my case I had few web sites of which the domain got expired due to my negligence. It was intentional as I was busy with my official job and was unable to spend quality time for multiple blogs. So I decided to delete such ‘dead’ WordPress installation completely with database, so that I can drastically improve my data backup time of the remaining sites.
I’m using Hostgator US hosting for the last 9 years as my hosting provider. I never faced any issue with them and their customer service is excellent. With Hostgator setting up a WordPress site is a child’s play. They offer one click WordPress installation. Without any prior knowledge you can set up a self-hosted WordPress website using Hostgator. Just register a domain with Hostgator or any other registrar and modify the DNS. Now install WordPress with one click installation. Your new website is ready within minutes. Anyway I’m not going to the detail. Now let us see the steps with picture to uninstall WordPress with data base in cPanel.
1. Log in to your Hostgator Control Panel aka cPanel.
2. Open File Manager.
3. Open the folder “public_html”
4. Double click the directory to delete (here weboftech.com)
5. On the right side panel look for the file “wp-config.php”. Right click on it to “View” it.
6. In the “wp-config.php” file locate for the line that contain “define(‘DB_NAME’, ‘sample_database’);”
7. Here the “techpack_wrdp2” is the data base associated with my dead website which we are about to delete.
8. Close the “wp-config.php” file and go back to File Manager> public_html>weboftech [you are already there].
9. Click on the right panel and “Select All” then click “Delete”.
10. Now go back to cPanel Home and open MySQL Databases, Select the database, here “techpack_wrdp2”.
You have now completely removed the database and WordPress installation in cPanel. In my case I deleted my addon domain website. You can do the same with your primary domain too.
Another scenario if your addon domain is running and primary domain got expired, here also you can uninstall and delete the WordPress installation of your expired primary domain. But carefully do and take a back up before.