admin管理员组文章数量:1406333
So I have hooked the wordpress plugin auto updated to effectively redirect my plugin to autoupdate from my own site rather than wordpress.
The updating process works seemlessly aside from one wierd hitch - the wordpress updater downloads the my_plugin.zip
file from my server, saves it in a temp directory as my_plugin-3sd123.tmp
(where the random string is generated by the wp updater to avoid file conflicts) and unzips it to wp-content/upgrades
which leaves a directory my_plugin-3sd123
in updates and then it copies this directory to plugins
and removes the old directory BUT never renames the new one to the old plugin slug..
Should I be writing my plugins to expect this? because I dont see it happening with other plugin updates?
So I have hooked the wordpress plugin auto updated to effectively redirect my plugin to autoupdate from my own site rather than wordpress.
The updating process works seemlessly aside from one wierd hitch - the wordpress updater downloads the my_plugin.zip
file from my server, saves it in a temp directory as my_plugin-3sd123.tmp
(where the random string is generated by the wp updater to avoid file conflicts) and unzips it to wp-content/upgrades
which leaves a directory my_plugin-3sd123
in updates and then it copies this directory to plugins
and removes the old directory BUT never renames the new one to the old plugin slug..
Should I be writing my plugins to expect this? because I dont see it happening with other plugin updates?
1 Answer
Reset to default 2It turns out the answer was simple I didnt have my plugins content in a subdirectory slug inside the zip file eg. I had :
my_plugin.zip
|- my_plugin.php
|- admin
|-admin.php
I should have had
my_plugin.zip
|-my_plugin
|-my-plugin.php
|-admin
|-admin.php
Once you add that sub directory the auto updated will work as expected
本文标签: Wordpress Automatic Plugin Update Renames Plugin Directory
版权声明:本文标题:Wordpress Automatic Plugin Update Renames Plugin Directory 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745000967a2636971.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论