I've written a script that basically loops through all of the WP sites on our server and updates everything: core, plugins, themes.
It does, however run into one issue: It will not update BackupBuddy. It will update 4 other premium plugins from various companies. I receive the following when trying to update it:
$wp plugin update backupbuddy Warning: Download failed. Forbidden Success: Translations updates are not needed for the 'English (US)' locale. Error: Updated 0/1 plugins. Enabling Maintenance mode... Downloading update from https://s3.amazonaws.com/downloads.ithemes.com/products/plugins/backupbuddy/backupbuddy-220.127.116.11.zip?AWSAccessKeyId=******&Expires=******&Signature=******... Disabling Maintenance mode...
I also receive an issue if I try to update the plugin through Jetpack Manage:
An error occurred while updating BackupBuddy on WEBSITE NAME.
I have found that if I physically login to the WP Admin, and then run the command in WP-CLI, I can update without an issue. Also, the same happens when I first login to the site, and then try to update it through Jetpack Manage.
The leads me to believe that BackupBuddy requires one to be logged in to update the plugin, which is difficult when managing multiple sites.
iThemes support has told me:
You could use something like iThemes Sync or a similar service. Since BackupBuddy uses licensing it may not be compatible with 3rd party updaters like wp-cli.
I'll pay if I have to, but it's hard to justify purchasing software to just update one single plugin, especially when that plugin includes it's own wp-cli commands to make backups.
Is there a way to either spoof a login from WP-CLI or do something else that can update it from the command line, or is iThemes Sync my only option?
- WP-CLI: 0.20.1
- WordPress: 4.3.1
- BackupBuddy: Varies, but no older than 18.104.22.168. Newest version that's not updated is 22.214.171.124.
Other things I've tried have been to pass the
--user=MYEMAIL@DOMAIN.COM flag, but I get the same error. It's a global parameter for WP-CLI, but I'm not quite sure what it does I guess.
I know that I can use the
--require flag to require a PHP file, but I have no clue if there's a file I can add to authenticate a user, and I worry about security if I created a file to auto-login. Then again, maybe there's a BackupBuddy file that can be required to authorize it.
Another option is the
--url flag. I tried using
--url=http://DOMAIN.COM/wp-admin but that didn't work either. I still got the
Download failed. Forbidden notice.
The only time I've had success when updating is if a coworker has logged into the site with their username, so it feels likes there's almost an expires nonce or transient that is set when someone logs in, allowing the download to be performed.