More fixes

WordPress install error: "Destination folder already exists"

You upload a plugin or theme and WordPress stops with "Destination folder already exists. Plugin installation failed." WordPress refuses to overwrite a folder that is already in wp-content/plugins/ or wp-content/themes/. Either the plugin really is installed, or an earlier install failed halfway and left its folder behind. Here is how to tell which, and the safe fix for each.

What the owner sees

harborbakery.example/wp-admin/update.php?action=upload-plugin

What the checks found


  

Find out which case it is (two minutes)

  1. Look at Plugins (or Appearance, Themes). If the plugin is in the list, it is installed and you are trying to install it a second time, usually to update it by hand.
  2. Not in the list? Then the folder is a leftover. A failed upload, a timeout or a lost connection can leave a half-copied folder that WordPress does not show, because it has no working main file.
  3. Check the server. In the host's File Manager or FTP, open wp-content/plugins/ (or themes/) and find the folder with the plugin's name. Note its date and size: a leftover is often small or missing files.

The fixes, by case

  1. It is installed and you want the new version: on WordPress 5.5 or newer, the upload screen now offers "Replace current with uploaded" when the zip matches an installed plugin or theme. Take a backup first, then click it. If you do not see that button, your WordPress is older than 5.5; update WordPress first, or update the plugin from the Plugins screen instead.
  2. It is a leftover from a failed install: back up the site, then delete only that one folder in wp-content/plugins/ (or themes/) and upload the zip again. A plugin that never finished installing has no settings to lose.
  3. A paid plugin with a licence: deactivate it first (not delete) if your licence is tied to the site, then use "Replace current with uploaded". Its settings live in the database and stay.
  4. It keeps coming back: the upload is failing partway every time. Look in wp-content/upgrade/ for leftover temporary folders and delete them, then check the upload size limit and the disk space on your hosting plan. A zip bigger than the limit fails the same way each try.
  5. Folder name matches a different plugin: two plugins can use the same folder name. Check the main file's Plugin Name: in the existing folder before you delete anything.

What you see, what it means, what it needs

What you seeWhat it meansUsual fix
Error, and the plugin is in the Plugins listIt is already installed"Replace current with uploaded" after a backup
Error, plugin not in the listA failed install left its folderDelete that one folder, upload again
No "Replace current" buttonWordPress older than 5.5Update WordPress, or update from the Plugins screen
Error comes back after every deleteThe upload fails partway each timeClear wp-content/upgrade/, check size limit and disk space
Same error for a themeSame cause in wp-content/themes/Same fixes, under Appearance, Themes

What not to do

Most cases are one button or one leftover folder. If the install still fails, that is what the box below is for. Related: plugin install or update failed, "The plugin does not have a valid header", upload errors.