You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use wp-cli in production on multiple very large sites to check for WordPress updates & watch for modified files via our monitoring system. We regularly run into an issue where wp core verify-checksums takes many minutes to run, due to the fact that the code searches the entire website root recursively to make a list of files for the "File should not exist" check.
I know that there is already an open issue to add the ability to skip files which would help with this issue, but I believe that an easier solution for very large sites like ours would simply be to add a command line switch that would disable the "File should not exist" check entirely.
Since adding the ability to skip files is probably a larger and more far-reaching task (which comes with it's own downsides - for example, we would need to maintain a list of the subdirectories to skip), would it be possible to just have a flag to disable the "additional files" feature at runtime to at least satisfy the simple use case of not wanting all files recursively listed?
Thanks and thanks again for the hard work on this tool!
Actually, after reviewing the code while I wrote this issue, I realized that this is actually a bug, not a feature - the code recursively lists every file in ABSPATH, but then filters out and ignores all but the ones in wp-includes/ & wp-admin/. With smarter handling of the paths that are recursed, we wouldn't even need to disable this check. I will see if I can write a patch & pull request to resolve this.
Activity
jasongill commentedon Nov 19, 2020
Actually, after reviewing the code while I wrote this issue, I realized that this is actually a bug, not a feature - the code recursively lists every file in ABSPATH, but then filters out and ignores all but the ones in wp-includes/ & wp-admin/. With smarter handling of the paths that are recursed, we wouldn't even need to disable this check. I will see if I can write a patch & pull request to resolve this.
jasongill commentedon Nov 19, 2020
I have submitted a pull request that fixes this bug and removes the need for us to skip this check entirely