The “Destination folder already exists” error message is shown when a user is trying to upload a WordPress plugin or theme, preventing the plugin/theme from being installed.
For this guide, I am updating Yoast SEO Premium to the latest version. I am updating it by uploading the newest version, as I want to replicate this error message and show you how to fix it.
What is the cause of the “Destination folder already exists” error message?
As the error suggests, WordPress does not allow installing a plugin or a theme if a folder already exists with that name, no matter whether it’s empty or not. You are likely to encounter this error message in one of these 2 most common scenarios:
- You are trying to update an existing plugin or theme on your website.
- An update or installation was interrupted and now you have an incomplete installation of the plugin or theme
This is a common issue, where the update process does not finish correctly and some files end up corrupted or missing. Often times, the plugin/theme will not show up at all in the WordPress dashboard.
- You have tried to delete a plugin or theme, but some files were left behind in that folder.
How to upload a plugin or theme when getting the “Destination folder already exists error message?
Time needed: 3 minutes.
There are multiple ways to overcome this error message, such as uploading the files through FTP, or by deleting the folder first. I will focus on the easiest and fastest solution I have found.
I highly recommend taking a backup of your website before doing so. While I never encountered any issues, it’s best to be on the safe side.
- Install the “Easy Theme and Plugin Upgrades” plugin
This plugin removes WordPress’ limitation to now allow a plugin or theme to be installed, if a folder already exists with that name. It will also make a copy of your old files that you are replacing. This way, you are not losing any of the old files, in case you will need them again later. You can download the old files from your WordPress Media Library (you will notice a .zip file of the old plugin/theme).
- Upload again the plugin or theme which was previously showing that error message.
As the WordPress limitation has been removed, we are now able to upload the plugin or theme. It will take backup the old files first, then replace them.
That’s it! We have uploaded the new plugin or theme files. In addition, a backup of the old plugin files can be found in the Media Library.