YunoHost-Apps / wordpress_ynh

WordPress package for YunoHost
https://wordpress.org/
GNU General Public License v3.0
26 stars 30 forks source link

unable to upgrade wordpress: "Could not deactivate the 'wp-fail2ban' plugin." #208

Open Toshiwoz opened 1 year ago

Toshiwoz commented 1 year ago

Describe the bug

When trying to update from version 5.9.3~ynh2 to 6.1.1~ynh1 I get the error message: [Error] Upgrade failed.

Apparently it's because the plugin wp-fail2ban cannot be deactivated (it is already deactivated, since the redux one is already there and active).

2023-01-24 23:49:14,235: DEBUG - + php7.4 /var/www/wordpress/wp-cli.phar --allow-root --path=/var/www/wordpress plugin is-installed wp-fail2ban
2023-01-24 23:49:15,319: DEBUG - + php7.4 /var/www/wordpress/wp-cli.phar --allow-root --path=/var/www/wordpress plugin deactivate wp-fail2ban
2023-01-24 23:49:16,019: WARNING - Warning: Could not deactivate the 'wp-fail2ban' plugin.
2023-01-24 23:49:16,019: DEBUG - Success: Deactivated 1 of 1 plugins.
2023-01-24 23:49:16,033: DEBUG - + php7.4 /var/www/wordpress/wp-cli.phar --allow-root --path=/var/www/wordpress plugin uninstall wp-fail2ban
2023-01-24 23:49:16,702: WARNING - Warning: The 'wp-fail2ban' plugin is active.
2023-01-24 23:49:16,702: WARNING - Error: No plugins uninstalled.
2023-01-24 23:49:16,719: DEBUG - + ynh_exit_properly
2023-01-24 23:49:17,224: DEBUG - + ynh_clean_setup
2023-01-24 23:49:17,225: DEBUG - + ynh_restore_upgradebackup
2023-01-24 23:49:17,225: DEBUG - + ynh_print_err '--message=Upgrade failed.'
2023-01-24 23:49:17,236: DEBUG - + ynh_print_log '[Error] Upgrade failed.'
2023-01-24 23:49:17,237: DEBUG - + echo -e '[Error] Upgrade failed.'
2023-01-24 23:49:17,237: DEBUG - + local app_bck=wordpress
2023-01-24 23:49:17,237: DEBUG - + NO_BACKUP_UPGRADE=0
2023-01-24 23:49:17,237: DEBUG - + ynh_backup_archive_exists wordpress-pre-upgrade2
2023-01-24 23:49:17,237: DEBUG - + yunohost backup list --output-as json --quiet
2023-01-24 23:49:17,237: WARNING - [Error] Upgrade failed.

Full log available here.

Context

Steps to reproduce

I tried from the web interface, as well from shell command, same result.

yunohost tools upgrade apps

Expected behavior

Regular upgrade.

Logs

Full log available here.

Toshiwoz commented 1 year ago

Apparently I found a solution, that is to remove the old fail2ban plugin. After that, the upgrade works.