Ffile2fix
Sign in Get started

How to fix "Destination folder already exists" in WordPress

Destination folder already exists. /home/user/public_html/wp-content/plugins/contact-form-7/
Plugin installation failed.

WordPress tried to install a plugin or theme into a folder that already exists in wp-content. This happens when a previous install or delete left the folder behind, or the plugin is already installed but not showing. Since WordPress 5.5 you can choose "Replace current with uploaded" for real installed plugins, but leftover folders still trigger this error.

Also appears as: Destination folder already exists. /home/user/public_html/wp-content/themes/astra/ Theme installation failed. · Installation failed: Destination folder already exists. · This plugin is already installed. (WordPress 5.5+ upload screen)

Common causes

  • A previous installation failed halfway and left an incomplete folder
  • The plugin was removed from the database list but its folder was not deleted
  • The plugin's main file is missing or broken, so WordPress does not list it
  • Uploading a ZIP whose folder name matches an existing plugin or theme
  • File permissions stopped WordPress from deleting the old folder

How to fix it

  1. Check the Plugins or Themes list. If the plugin is listed, use the upload screen's "Replace current with uploaded" option or update it normally instead of installing again.
  2. Delete the leftover folder. If it is not listed, connect by FTP or the file manager and delete the folder shown in the error, for example wp-content/plugins/contact-form-7. Your plugin settings in the database are not removed.
  3. Or rename it as a backup. If you are unsure, rename the folder to contact-form-7-old instead of deleting it. Install again, test, then remove the old folder.
  4. Install again. Return to Plugins > Add New or Appearance > Themes and install the plugin or theme again.
  5. Use WP-CLI to force the install. Run wp plugin install contact-form-7 --force or wp theme install astra --force to overwrite the existing folder in one step.

Reinstall over an existing folder with WP-CLI

cd /home/user/public_html
wp plugin install contact-form-7 --force --activate
wp theme install astra --force

How to stop it happening again

  • Delete plugins from the Plugins screen, not by deactivating only
  • Keep folder permissions at 755 so WordPress can manage them
  • Do not interrupt installs or updates
  • Use the Replace option when uploading a newer ZIP

Frequently asked questions

Will deleting the folder delete my plugin settings?

No. Settings are stored in the database. Deleting the folder only removes the code, so reinstalling restores the plugin with its settings.

Why is the plugin not in my list if the folder exists?

WordPress lists a plugin only if it finds a main PHP file with a valid plugin header. An incomplete install may lack that file.

Can I just overwrite it with a new ZIP?

Yes, if the plugin is listed you will see "Replace current with uploaded" after uploading. For leftover folders, delete or rename them first.