WordPress installation directory is not empty error and fix

We have demonstrated how WordPress can be easily setup with Hostgator web hosting service. They offer a wide range of quickinstalls or auto installers we can use. To set up a CMS or website using these one-click installers is easy, straightforward and very fast. You can refer to this guide to quickly create a WordPress site using the one-click installer.

Some users have followed the above step-by-step guide to set up their WordPress using the auto installer, however their attempts failed and bounced back with the same error. The error says WordPress installation directory is not empty, it needs to be installed to an empty directory. They can’t fix the problem even after they have deleted all files and even databases from cPanel.

Wordpress installation failed error directory not empty hostgator

There are three ways to solve the installation directory is not empty problem.

First of all you go to cPanel >> File Manager, to make sure the directory your domain or subdomain points to is empty. If you are not sure of the domain path, find it out from cPanel >> Domains >> Addon Domains or Subdomains.

When you are trying to launch File Manager in cPanel, you will be prompted to display the hidden files or not, make sure to show hidden files in cPanel otherwise certain file types will be invisible.

If you are not sure whether the existing files under your document root directory can be deleted or not, you may consider to rename the folder first, then create a new blank folder with the same name. For example, if your domain points to /public_html/site1, you can rename it from ‘site1’ to ‘site2’, then create a blank folder and give it its original name ‘site1’.

Try to install WordPress again the installation folder is not empty error should not occur any more.

visit host

Another method is to map your domain or subdomain to a new empty folder. Go to create a new empty folder from cPanel >> File Manager if not yet. Then go back to cPanel, select Domains >> Addon domain or subdomain, and modify its document root folder, point it to the new empty directory.

Deleting and adding the domain or subdomain can also help you fix the problem. You can follow the steps to add new domain in cPanel with Hostgator. Assign an empty folder as the document root when creating or adding domains or subdomains in cPanel so as to prevent the installation directory is not empty error.

Note that primary domain will be mapped to the public_html folder by default and you can’t change it. So if you install WordPress with your primary domain and get above installation folder is not empty error, you need to empty the above said root folder.

Leave a Reply

Your email address will not be published. Required fields are marked *