$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>Can a manually uploaded plugin be made to track updates from the WordPress.org plugin directory?|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Can a manually uploaded plugin be made to track updates from the WordPress.org plugin directory?

matteradmin10PV0评论

I've made a plugin which I will give to some users to test by manually uploading the zip file. I later on want to host the plugin in the WordPress plugin directory, but I want to avoid users having to uninstall my plugin to install the directory-hosted one because I have code in my uninstaller that deletes all of the terms, etc. that my plugin adds.

Is there a way to make WordPress track a plugin in the official directory instead of a locally uploaded zip?

I've made a plugin which I will give to some users to test by manually uploading the zip file. I later on want to host the plugin in the WordPress plugin directory, but I want to avoid users having to uninstall my plugin to install the directory-hosted one because I have code in my uninstaller that deletes all of the terms, etc. that my plugin adds.

Is there a way to make WordPress track a plugin in the official directory instead of a locally uploaded zip?

Share Improve this question asked Jan 10, 2019 at 19:05 SeanSean 6777 silver badges17 bronze badges 1
  • 1 Literally all you need to do to receive updates via is to have the same name as a plugin hosted in the repository. So as long as your manually uploaded version has the same directory name and a lower version number your users will get updates from the repository when you host it there. – Jacob Peattie Commented Jan 10, 2019 at 23:54
Add a comment  | 

2 Answers 2

Reset to default 1

As long as everything was made according to WP best practices all your manually installed versions will update the same as the ones installed from wordpress.

The updater looks at many things to identify your plugin. However, the most important is the plugin URI (you can change the directory of many plugins and they will still work), but the name and slug are also checked. After WP detects that it has a matching plugin it will check the version and send out update information as needed.

Edit 1 Based on a little more research, I see that the update check seems to be done by wordpress at this url: http://api.wordpress/plugins/update-check/1.1/ to see how the call is structured you can look at the core code for wp_update_plugins().

The reason your manually installed plugin will update is the same as the reason you can manually download and install a plugin from wordpress and see it recieve updates in the wp-admin.

There is a way to have a privately-hosted plugin folder that will get updated via the normal Admin, Updates process. It's a bit complex to set up, but I have done it.

The info is here: https://github/YahnisElsts/plugin-update-checker#github-integration .

I modified it to use a private area of a domain I own to be the code repository.

Post a comment

comment list (0)

  1. No comments so far