[Solved] Installation Directory Is Not Empty Please Install To An Empty Location
Fix Hostgator Installation Directory Is Not Empty Please Install To An Empty Location and destination folder already exist WordPress Error.
This error you may get while uninstalling your WordPress website. While uninstalling your WordPress website so many times you miss necessary things which need to be deleted. For reinstalling WordPress you might end up with problems like Installation Directory Is Not Empty Please Install To An Empty Location and destination folder already exist.
Before I start giving you tips to fix this installation failed error let me explain some basics of WordPress.
WordPress is a combination of 2 things
- File manager
Database – this stores all your WordPress data like post data, page data, comments, etc (not advisable to play with this ). and the database has 2 important things. Current user and Current database
File manager – This stores all your media files, CSS, and PHP files. All modifications are done via File Manager
Note- Create a Backup of your Cpanel Before you delete anything
So while installing you need to delete 3 important file
- Files of your domain from file manager
- Current database user
- current user
Steps require for fixing destination folder already exit
- Login to your Cpanel and click on file manager
- Here you need to delete your website folder if you have only one domain in your Cpanel then delete public_html. for multiple domains, you need to delete Your exact folder which has your website name say example.com.
- Open Mysql database and phpmyadmin in new tab
How To Know Which Domain Belongs To Which Database In Phpmyadmin
- via Phpmyadmin we need to know which database belongs to which domain. Here on the left side, you will find your Cpanel name with a small +icon just beside that click on that then 4-5 database names will come in the dropdown menu which will be like cpanel_wrdp1. Click on any one of them and then you will get a drop-down menu on your right side which will be having so many wp tables like wp_comment, wp_options, etc (you can even verify via wp-config.php).
- Now click on wp_options
- you will get the site URL and site name
- whichever WordPress table gives you, your website name. You need to remember that database name
Now we have to delete our database . as I have already told you we have 2 deleted things inside the MySQL database. Current database user and Current database
- Delete the current database which was connected to your domain (you can even verify via wp-config.php)
- Delete the current user which was connected to your domain (you can even verify via wp-config.php)