admin管理员组文章数量:1406322
I'm running into an issue I haven't encountered before where WP-CLI is not recognizing plugin updates for commercial plugins.
The plugin updates appear in my WordPress dashboard, but running ../wp-cli.phar plugin update --all
doesn't update them. If I run ../wp-cli.phar plugin list
it doesn't show them as having updates.
I've run updates through WP-CLI for the same commercial plugins on other servers without any problem. The only thing different on this server is that I don't have sudo
access, so, as you can see, I'm calling wp-cli.phar
directly instead of via the wp
command.
WP-CLI is processing plugin updates from the repository without any problems on this installation.
I'm running into an issue I haven't encountered before where WP-CLI is not recognizing plugin updates for commercial plugins.
The plugin updates appear in my WordPress dashboard, but running ../wp-cli.phar plugin update --all
doesn't update them. If I run ../wp-cli.phar plugin list
it doesn't show them as having updates.
I've run updates through WP-CLI for the same commercial plugins on other servers without any problem. The only thing different on this server is that I don't have sudo
access, so, as you can see, I'm calling wp-cli.phar
directly instead of via the wp
command.
WP-CLI is processing plugin updates from the repository without any problems on this installation.
Share Improve this question asked Oct 22, 2015 at 9:46 NateWrNateWr 7924 silver badges14 bronze badges 8 | Show 3 more comments2 Answers
Reset to default 1What you experienced may be some network level problem or someone temporary removed the download resources. For instance before the update.
Most of the details you can get from the source code https://github/wp-cli/wp-cli
.
Plugin update function in there looks like this.
function update( $args, $assoc_args ) {
if ( isset( $assoc_args['version'] ) ) {
foreach ( $this->fetcher->get_many( $args ) as $plugin ) {
$assoc_args['force'] = 1;
$this->install( array( $plugin->name ), $assoc_args );
}
} else {
parent::update_many( $args, $assoc_args );
}
}
And when you specify wp plugin update --all
it actually goes through the
parent::update_many
function, where the parent is actually CommandWithUpgrade
class.
Bottomline, wp-cli
uses resources provided by plugins like this:
# Install from a remote zip file
wp plugin install http://s3.amazonaws/bucketname/my-plugin.zip?AWSAccessKeyId=123&Expires=456&Signature=abcdef
But there you can see the information you should not see.
Sidenote
Please note that some premium plugins does not support being upgraded via WP-CLI. E.g. I know BackupBuddy and Gravity Forms works fine, but the plugins from Yoast does not. This may change.
The user who executes wp-cli needs write permissions on wp-content
and subdirectories – if only some plugins fail, maybe these plugins' directories are read-only for that user.
There is a bug in wp cli which will not report missing file permissions, and instead reports that the plugin is already updated.
The described symptoms apply to that situation, hence this will be a solution for some.
本文标签: wp cliWPCLI not recognizing commercial plugin updates
版权声明:本文标题:wp cli - WP-CLI not recognizing commercial plugin updates 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744998346a2636819.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
wp-cli.phar
directly with the pro version of Advanced Custom Fields. An update is available, and it shows as available in wp-cli's output. What plugins are you trying this with? Is it possible that they're bypassing WP's normal routines for this and thus not being picked up by wp-cli? – Tim Malone Commented Jun 30, 2016 at 5:41