I'm using this library to auto-update my plugin, but it's only extracting the new plugin files into a .tmp directory, while the old plugin files stay where they are. Can anybody help me fix this to overwrite the old files or any ideas as to why it would be doing that?

Edit: I know that the library above does not actually install the update, but the WP core updater does, so it has something to do with that. Any ideas?

2 Answers 2


Are you able to update standard WP repo plugins? I am using that library and it seems to work well.

What's the exact error that WordPress gives on the admin screen when it tries to run the update?

I would take a look at permissions first. What are the permissions on the old plugin directory? Any different than any of your other plugin directories?

I would also take a look at the format of the zip file you're feeding it. What software did you use to create the zip? When you unzip it, what does the directory structure look like? It should unzip as a folder with the same name as the plugin you're trying to replace. Did you set the slug attribute in the JSON file? Does that also match the folder name?

Hope this helps. I was able to get that library going pretty quickly.

  • with your suggestion, I was able to figure out my problem. Thank you much! :)
    – Jared
    Commented Mar 15, 2011 at 10:50
  • @Dalton, the solution in my case was this: "It should unzip as a folder with the same name as the plugin you're trying to replace"
    – KalenGi
    Commented Mar 5, 2012 at 11:03

I had this problem too, the problem was that my zip file just contained the files and not the extra containing folder needed: my_plugin.zip should contain a folder my_plugin which then contains the plugin files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.