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?
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.
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.