mirror of
https://gh.wpcy.net/https://github.com/wp-cli/handbook.git
synced 2026-04-28 14:13:52 +08:00
- Organize files in folders according to the desired structure - Use directory iterator to loop through all files and folders (makes generation more robust)
15 lines
989 B
Markdown
15 lines
989 B
Markdown
# Identify a Plugin or Theme Conflict
|
|
|
|
Is WP-CLI not working with your WordPress install, but you don't know why? It might be a plugin or theme conflicting with the WP-CLI load process.
|
|
|
|
To verify, first run `wp --skip-plugins --skip-themes` to execute WP-CLI without loading plugins or themes. If WP-CLI runs as expected with plugins and themes skipped, then the problem is caused by one of those plugins or the active theme.
|
|
|
|
To see if the source of the problem is the active theme, run `wp --skip-themes` to see if WP-CLI loads as expected.
|
|
|
|
To see if the source of the problem is an active plugin, run wp `--skip-plugins=<plugin-slug>` for each active plugin to see which plugin blocks the full execution of WP-CLI. For instance, skipping the Akismet plugin would be:
|
|
|
|
wp --skip-plugins=akismet
|
|
|
|
Or, use `xargs` to try the entire list of active plugins:
|
|
|
|
wp plugin list --field=name --status=active --skip-plugins | xargs -n1 -I % wp --skip-plugins=% plugin get % --field=name
|