Troubleshooting · Troubleshooting
How to Fix "Destination Folder Already Exists" in WordPress
Short answer
To fix “Destination folder already exists” in WordPress, delete or rename the leftover folder in wp-content/plugins or wp-content/themes, then install the plugin or theme again. If WordPress recognizes the installed copy, upload the ZIP and click “Replace current with uploaded” instead. Back up your files and database first, and contact your host if the folder will not delete.
Key takeaways
- “Destination folder already exists” means a folder with the same name is already in wp-content/plugins or wp-content/themes.
- WordPress 5.5 added the “Replace current with uploaded” option for ZIP installs, with a version comparison table.
- If WordPress does not offer the replace option, delete or rename only the folder named in the error, then install again.
- Back up files and database before deleting a folder, and keep 3 to 5 recent backups in different places.
- If File Manager and FTP cannot delete the folder, the cause is usually ownership or permissions, so contact your host.
What does “Destination folder already exists” mean in WordPress?
It means WordPress found a folder with the same name where it planned to unpack your plugin or theme, so it stopped the install instead of overwriting the files already there.
The full message reads “Installation failed: Destination folder already exists.” and names the folder path. A path with wp-content/plugins/ points to a plugin, while a path with wp-content/themes/ points to a theme.
WordPress stops the install on purpose. The developer reference for WP_Upgrader::install_package() says the installer aborts when the destination folder already exists, and that safety check is on by default.
The check only fires when the folder holds files. The same reference shows core looks inside the folder first, so an empty folder does not block the install and a folder with even one file does.
Why does WordPress show this error?
A failed or stopped install is the most likely cause. If the connection drops, the server times out, or you close the tab mid-install, WordPress can leave a half-unpacked folder behind.
| Cause | How to spot it | First fix |
|---|---|---|
| Failed or stopped install | Folder exists but the plugin or theme is missing from the dashboard | Delete the folder, then install again |
| Plugin or theme already installed | It appears under Plugins or Appearance > Themes | Activate it, or use Replace current with uploaded |
| Delete did not finish | The item is gone from the dashboard but its folder is still on the server | Delete the leftover folder |
| Migration or restore | The error appears right after a move or a restore | Delete the folder the restore brought back |
| Manual upload | Someone copied the folder by FTP or File Manager earlier | Delete or rename that folder |
Hostinger's tutorial on this error lists the same two main triggers: an incomplete install and an interrupted uninstall. It also notes that the fix stays the same in both cases: remove the folder that blocks the install. Read the Hostinger tutorial for the full walkthrough.
A site move can bring old folders back with it. If the error started right after a migration with Duplicator, check the folders the move created before you change anything else.
How do you check whether the plugin or theme is already installed?
Open Plugins > Installed Plugins for a plugin, or Appearance > Themes for a theme, and look for the name from the error message.
If the item is listed and active, it is already installed and you do not need to install it again. If it is listed but inactive, click Activate and skip the reinstall.
If the item is missing from the dashboard but its folder is on the server, the folder is a leftover. That mismatch is the case this guide fixes, so move on to the delete steps below.
An old listing can also mean the plugin was closed or left behind by its author. Our guide to finding abandoned WordPress plugins shows how to check its update history before you reinstall it.
Before you reinstall a plugin from an unknown ZIP, check it first. Our guide to checking a plugin for known vulnerabilities explains what to look for.
How do you fix it with “Replace current with uploaded”?
Upload the same ZIP again and click “Replace current with uploaded” when WordPress offers it.
WordPress added this option in version 5.5, released in August 2020. The WordPress 5.5 developer notes say uploading a ZIP shows a comparison table with the differences between the uploaded file and the installed version.
- Go to Plugins > Add New Plugin and click Upload Plugin, or go to Appearance > Themes > Add New Theme and click Upload Theme.
- Choose the ZIP file on your computer and click Install Now. Do not unzip the file first.
- Read the comparison table and check that the uploaded version is the one you want.
- Click Replace current with uploaded and wait for the success message.
Replacing the files does not remove your content. The WordPress backup handbook explains that a site has two parts, files and database, and your posts and settings live in the database, so a file swap alone does not wipe them.
If WordPress does not offer the replace button, the folder is not a working install. Use the File Manager or FTP steps below instead.
How do you delete the leftover folder in File Manager?
Open your host File Manager, go to public_html/wp-content/plugins or wp-content/themes, and delete only the folder named in the error.
Back up first. The WordPress backup handbook says to back up your database regularly and always before an upgrade, and it suggests keeping at least 3 to 5 recent backups in different places.
If you have no backup yet, make one before you touch any folder. Our guide to backing up WordPress walks through the file and database steps.
- Open File Manager in your hosting panel. In cPanel it sits under Files.
- Open public_html, then wp-content, then plugins or themes.
- Find the single folder with the exact name from the error message.
- Right-click it and choose Delete, then confirm. In cPanel, deleted items move to Trash first, so click Empty Trash to remove them for good. See the cPanel File Manager docs for the exact delete steps.
- Go back to the dashboard and install the ZIP again.
Delete only that one folder. Nexcess warns in its cPanel guide that deleting files and folders removes them for good, and it advises taking a manual backup before you delete anything.
If you are unsure what is inside the folder, rename it instead of deleting it. Add -old to the name, install again, and delete the renamed folder once the new install works.
How do you delete the leftover folder with FTP?
Connect with an FTP client, open wp-content/plugins or wp-content/themes, and delete the same single folder.
- Connect with your FTP or SFTP login details from your host.
- Open public_html, then wp-content, then plugins or themes.
- Right-click the folder named in the error and choose Delete.
- Return to the dashboard and install the ZIP again.
FTP helps when your host has no File Manager or the dashboard cannot write files. Hostinger's tutorial gives the same path for FTP: public_html, then wp-content, then plugins or themes. See the Hostinger tutorial for the FTP steps.
If the delete fails, the cause is often file ownership or permissions rather than the folder itself. The WordPress file permissions handbook lists 755 for directories and 644 for files as the usual values, and it warns that no directory should ever get 777.
How do you fix it with WP-CLI?
Run wp plugin install with the --force flag to overwrite the existing folder from the command line.
The WP-CLI command reference says --force overwrites any installed version of the plugin without asking for confirmation. That makes it fast, but it also means there is no second chance to stop it.
wp plugin install /path/to/plugin-name.zip --force
For a theme, use wp theme install with the same --force flag and the path to the theme ZIP. Only use WP-CLI if your host gives you SSH access and you know the exact ZIP path.
A wrong path or a wrong slug can overwrite the wrong plugin, so double-check the command before you press Enter. If you are not sure of the path, use the File Manager steps above instead.
How do you know the fix worked?
The install finishes with a success message, and the plugin or theme appears in the dashboard with the version you uploaded.
- The plugin shows under Plugins > Installed Plugins with the new version number, or the theme shows under Appearance > Themes.
- The plugin activates without an error, and its settings page opens.
- The front of the site loads as before, with no new error message.
Check the version number, not just the name. A folder can exist with old files in it, so the version on the Installed Plugins screen is the proof that the new files landed.
If the same error returns on the next install, the folder came back or was never removed. Open File Manager again and check whether the folder is still there before you repeat the install.
When should you contact your host?
Contact your host when File Manager or FTP will not delete the folder, or when the error keeps coming back after a clean delete.
- The delete button fails, or the folder returns after you delete it.
- You see a permissions or “not writable” message you cannot clear.
- You have no File Manager or FTP access on your plan.
- The site shows a new error after the reinstall.
Tell support the exact error text, the full folder path, and what you already tried. That detail lets them check ownership and permissions on the server instead of starting over.
If the site shows a 500 error after the reinstall, our guide to fixing the 500 internal server error covers the next steps.
Hosts can also fix ownership when files were created by a different user. The WordPress permissions handbook notes that files should be owned by your user account, not by the web server process, on shared hosting.
What mistakes should you avoid?
Do not delete the whole plugins or themes folder, and do not delete a folder until you have checked its exact name against the error.
- Deleting the parent wp-content/plugins folder instead of one plugin folder.
- Deleting a working plugin folder to fix an install you could have finished with Replace current with uploaded.
- Installing the ZIP again without removing the folder and expecting a different result.
- Renaming the ZIP file and hoping the folder name changes with it.
- Skipping the backup before you delete or replace files.
A renamed ZIP does not change the folder inside it. WordPress reads the folder name from the files in the archive, so check the name inside the ZIP before you upload it.
Frequently asked questions
Can I just rename the folder instead of deleting it?
Yes. Add -old to the folder name in File Manager or FTP, then install the plugin or theme again. Renaming takes the folder out of the way without destroying its files, so you can restore it if something goes wrong. Once the new install works and the site loads as normal, delete the renamed folder.
Will deleting the plugin folder delete my settings?
No. WordPress stores plugin settings in the database, not in the plugin folder, so deleting the folder alone does not wipe your settings. Files added by hand inside that folder are lost, though, and any direct edits to plugin files disappear too. Back up the folder before you delete it if it holds anything custom.
Why does WordPress not offer Replace current with uploaded?
WordPress only shows that button when it recognizes the installed copy during a ZIP upload from the dashboard. A broken or half-installed folder is not a working install, so WordPress cannot compare versions and shows the error instead. In that case, delete or rename the leftover folder and install the ZIP again.
What if the error appears when I update a theme?
The fix is the same. Themes live in wp-content/themes, so open that folder in File Manager or FTP and remove only the folder named in the error. You can also upload the theme ZIP from Appearance, then Themes, then Add New Theme, and click Replace current with uploaded if WordPress offers it.
Do I need FTP if I have File Manager?
No. File Manager and FTP do the same job here, so use whichever your host gives you. FTP is the fallback when your host has no File Manager, or when the dashboard cannot write files. Both take you to the same public_html, wp-content, plugins and themes folders.
What if the folder keeps coming back after I delete it?
A restore or migration may be copying the old folder back, or the delete may be failing because of ownership or permissions. Check the folder right after you delete it, and check whether a backup restore or staging sync ran at the same time. If the folder returns again, contact your host with the exact path.
Sources
- Miscellaneous Developer Focused Changes in WordPress 5.5 Make WordPress Core
- WP_Upgrader::install_package() WordPress Developer Resources
- wp plugin install WordPress Developer Resources
- How to Fix Installation Failed: Destination Folder Already Exists Hostinger Tutorials
- Backups WordPress Developer Resources
- Changing File Permissions WordPress Developer Resources
- File Manager cPanel & WHM Documentation
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
