-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Way to delete old core files after core update #141
Comments
WP-CLI currently diffs the old checksums against the new checksums to decide what left-overs to purge in core-command/src/Core_Command.php Lines 1350 to 1393 in 1fa06e0
However, for combinations of locales & versions that we don't have checksums available, this just fails with a message that cleaning up by hand is required. However, WordPress provides a list of files that are supposed to be deleted and deletes them by default on update: https://github.com/WordPress/wordpress-develop/blob/a216b6d83845dc4cdd01ff517cdf36b72043b6b3/src/wp-admin/includes/update-core.php#L20-L791 We should combine this data with the checksums, to use the checksums to only delete old files when they have not been modified, and to unconditionally delete old files when we don't have checksums to verify for modifications. |
I assume my problem goes in the same direction |
@Aaron-Ritter Message posted by you is caused by the same issue. AFAIK the issue is still considered to be fixed. |
thanks @wojsmol at least that confirms my finding :) I was wondering if there is an alternative solutions, the Wordpress Updates are in the meantime often scheduled for fully automatic upgrades too, so maybe I could trigger that particular job through wp cli instead avoiding the wp core update all together. |
@Aaron-Ritter This is indeed still an issue. The latest update for this is that release 5.9 showed that the WordPress update process is broken as well and will be rethought for 6.0. Hopefully, that rethinking can also include WP-CLI-usable logic that just works. |
Current WordPress emits still the same warning message: |
Feature Request
Describe your use case and the problem you are facing
Currently there is no way to delete old core files if during the update checksums for target WP version and locale aren't available.
Describe the solution you'd like
Command or a flag to delete old core files.
A clear and concise description of what you want to happen.
A way to delete old core files after core update exists.
The text was updated successfully, but these errors were encountered: