One of the most frustrating errors that WordPress throws up is when it tells you “Destination Folder Already Exists” and you know it doesn’t. Or rather, it shouldn’t. Maybe you are updating a theme. Or installing a new plugin. You could be restoring a backup of something that you know you removed from your file system. It can be enraging. However, in terms of error messages, being told that the destination folder already exists is one of the better ones to get. You know exactly what is going on, the messaging is clear, and because of that, we can guide you to a simple and fast solution.
What Causes the “Destination Folder Already Exists” WordPress Error
Put simply, WordPress shows this error when you take an action that should create a folder, only to have WordPress see that a folder with that exact same path already exists in your file structure. In these cases, it’s a good thing that WP tells you rather than overwriting whatever is there. That way lies lost data and website crashes.
Luckily, over time, WordPress itself has become better at messaging with this error. It gives you the reasons why it appears and a couple of options to fix it. The most common reason to get it, as you can see above, is that This plugin is already installed. Additionally, you can also get this same kind of screen when uploading and tweaking theme files.
You may be uploading a second instance of a plugin or theme for a number of reasons, one of the most common is simply updating versions of a downloaded plugin. (Note that if you use FTP to replace an outdated plugin you will not see this message.)
Other reasons you may see this error include previously trying to install a plugin or theme but the process failed. In that case, WordPress would have created the folder before the process finished, but had no reason to remove it or other files when the process was interrupted. The same thing could also happen when you uninstall a plugin or theme. Sometimes files get left behind. And when you’re trying to reinstall or update, WordPress tells you “nope, they’re already there, friend.”
One of the most common for me, personally, is accidentally double-clicking the install button, which WordPress takes as instructions to start the process and create a folder, interrupt the process, and then restart the process only to find the destination folder already exists. I cannot tell you how many times this has happened to me over the years.
As annoying as all of that is, you can fix the error without much hassle. So let’s dig in and get those folders cleared away.
How to Fix the “Destination Folder Already Exists” WordPress Error
First of all, back up your site. If your host doesn’t provide backups, we recommend installing one of the most popular WordPress backup plugins. Whenever you fiddle with the files for your site, it’s always prudent to have an immediate backup you can restore if something goes wrong.
The easiest way to bypass the “destination folder already exists” error is to press the Replace Current with Uploaded button when the message pops up. Doing so will overwrite any existing files and folders, finishing the installation like normal.
This is a relatively new addition to WordPress at the time of this writing, and it works very well. Definitely a quality-of-life improvement.
The Manual Fix
If you prefer a more hands-on approach, you will want to connect to your website’s server, either by FTP or your hosting dashboard’s file manager. You can find full details on the FTP connection process in this article on plugin uninstallation. Once you’re connected, you’re going to want to find your site’s plugins/themes folder. Whichever one is giving you the error. For most hosts, you will find that will be /public_html/wp-content/themes (or /plugins).
Navigate to either the plugins or themes directory and find the folder that WordPress has problems with. If you want, you can download the folder and any files as backups, but that’s optional since they’re extras regardless. Chances are you will not need them, but anytime you take files off a server, it’s good practice to keep them just in case.
Using either FTP or the file manager, you can bring up a right-click context menu. At this point, you can do two things. The first is simply deleting the folder and any contents. This will clear up the naming discrepancy that is making WordPress say that the destination folder already exists. After all, it will no longer exist.
You can also choose to rename the folder (or move it elsewhere). Taking this route will save any files that have been left behind for the off-chance that you might potentially need them. Needing them is highly unlikely, but this is a way to back them up without backing them up.
Once that’s done, you can safely upload the plugin or theme files into the directory without worry. You can also return to the WordPress dashboard and continue the upload and installation process from there. You don’t want to do both of these, however. That’s possible to return the same “destination folder already exists” error message from WordPress.
However, if that’s the case, you can always press the Replace Current with Uploaded button which will just overwrite whatever’s there anyway. Either way, the “destination folder already exists” error should go away at this point.
WordPress developers have made fixing this error significantly easier by providing users with a Replace Current with Uploaded button on the error page. However, not everyone wants to use an automated fix, and for those people, connecting by FTP or through a file manager is almost just as easy. Just find the folder in question, delete/rename/move it, and attempt the upload again.
How have you had to deal with WordPress telling you the destination folder already exists?
Article featured image by Sazhnieva Oksana / shutterstock.com