There will be lot of folders or directories accumulated in your hosting account when you use WordPress over the period of time. Every plugin and theme you install will create lot of directories and subdirectories on your WordPress installation. Especially caching plugins like W3 Total Cache will create multiple directories to store different types of cached files. It is very easy to create directories by installing plugins and themes through admin dashboard. you can also easily delete the plugins and themes easily from dashboard.
What Situations You Will Have Residual Files?
The issue comes when there are residual files on your WordPress installation due to the following situations:
- You have manually installed WordPress for playing around but decided to delete.
- You have installed WordPress using one-click applications like Softaculous and decided to delete.
- Plugins created lot of folders, which will not be deleted when deleting the plugin.
- You can store content for temporary use in subdomain or addon domain.
- You decided to delete subdomain or addon domain which is no longer in use.
- You want to delete the complete installation and reinstall.
At any case, it is necessary to cleanup the unnecessary directories to speedup your primary WordPress installation. Remember, having multiple installations on the same server will severely impact the server response time thus showing low score on Google PageSpeed Insights and other tools like Pingdom or GTmetrix.
File count is an important factor on many shared hosting companies. Whenever the number of files on your account goes beyond the limit, hosting company will stop the services due to violation of terms.
How to Delete the WordPress Directories Quickly?
Now that deleting unnecessarily files is a necessary action but not so easy to do. The normal process is to login to your FTP account and delete the directories. Or you can request your hosting company to delete the files and directories for you. But in general case, both these options are time consuming and even some host may charge you for doing such requests. Here we explain two tricks to delete WordPress directories quickly based on the way you have added up those directories.
Deleting Using One Click Applications
If you have installed WordPress using one click applications like Softaculous then it is easy to delete with one click again. Go to your cPanel account and open Softaculous application. It will show you the list of apps that you have installed through Softaculous.
Click on the delete (X) button under “Options” to destroy the complete installation. You can choose the directories, database and database user. This is a very effective way to delete the WordPress installation. Otherwise you need to delete the directories through FTP and then delete database and users through MySQL Database sections.
You can also see the details of the root directory, database, etc.
After checking all the details, click on “Remove Installation” button. You will see a message showing that this is an irreversible action. Click “OK” to proceed further.
The process will run for merely few minutes and the complete WordPress installation will be destroyed.
You will see a success message after completion of the process.
Deleting Directories Using FTP Account
The above method is useful for deleting complete WordPress installation. What about deleting a single directory left over by a plugin or a subdomain? Go to your cPanel and open “FTP account” section.
Create a FTP account with the access to the directory you want to delete. For example, we want to delete the subdomain called “ebooks”. This is located under “public_html/ebooks”. So you should provide the directory name as “/home/cPanel-username/public_html/ebooks”. Provide the correct details and click on the “Create FTP Account” button.
Once the account is created, you can see it is listed in the bottom FTP Accounts section.
Now click on “Delete”. You will see two options – one is for “Delete Account” and other is for “Delete Account and Files”. Delete account option will only delete the FTP account while delete account and files option will delete the FTP account and the entire directory you have provided when creating the account. Click on the “Delete Account and Files” option.
In matter of seconds the entire directory and subdirectories will be deleted (in our case ebooks and all subdirectories inside ebooks directory). Be very careful when providing access to FTP account, otherwise you may wrongly deleting different directories affecting the site. Also ensure to have a backup so that you can restore in case of any problem.
I wanna ask you a question: How can i move my entires post-blog on root to a sudirectory on wordpress?
There are no quick options for this. You have to install WordPress on subdirectory and then export/import the content. Finally, you also need to setup 301 redirects. These articles may help you: