最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Upgrade private plugin without deleting files?

programmeradmin3浏览0评论

I have developed a private plugin, that is distributed and installed as a zip file. With this plugin users can upload files and the files will be stored inside the plugin’s directory.

Now, I’ve got the problem, that I can not upgrade this plugin. If I try to upload a newer version, the installation will fail, because the directory already exists.

Some people suggested to uninstall the old version first, but this is impossible for me, because then all uploaded files will be lost.

Have you any suggestions to solve my problem?

I have developed a private plugin, that is distributed and installed as a zip file. With this plugin users can upload files and the files will be stored inside the plugin’s directory.

Now, I’ve got the problem, that I can not upgrade this plugin. If I try to upload a newer version, the installation will fail, because the directory already exists.

Some people suggested to uninstall the old version first, but this is impossible for me, because then all uploaded files will be lost.

Have you any suggestions to solve my problem?

Share Improve this question asked Jul 16, 2015 at 10:40 HeikoHeiko 1111 bronze badge
Add a comment  | 

2 Answers 2

Reset to default 1

GitHub Plugins With Automatic Upgrades is a highly detailed article I'm referring to related to a project I have which will require automatic (one button) upgrades for both GitHub hosted + Website hosted plugins.

The idea is very simple. During the upgrade process, your code modifies the WordPress internal data structures to look enough like the WP repository to allow the automated upgrade to occur.

A good way to approach this is do download the GitHub code + get it working.

Then add your code into the working GitHub code skeleton.

This is the solution I've used, it's simple and straightforward.

Self Hosted WP Plugin Updater: https://github/omarabid/Self-Hosted-WordPress-Plugin-repository

发布评论

评论列表(0)

  1. 暂无评论