WPCLI often gets out of memory error, while the site runs fine.
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start by reproducing wp plugin list with many large plugins and compare it with --skip-plugins in the reported PHP 8.4 Linux environment. Trace where the memory allocation failure occurs and identify whether the problem is in WP-CLI or plugin loading. Done means the command runs successfully without exceeding memory while the site remains unaffected.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug Report
--- ✅ If you are in the correct location now... --->
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
Sometimes wp cli can run out of memory, while site itself is fine and not hitting the limit. This seems to be common among those sites with many large plugins. For example, one had these:
wp plugin list --skip-plugins
+---------------------------+----------+-----------+---------+----------------+-------------+
| name | status | update | version | update_version | auto_update |
+---------------------------+----------+-----------+---------+----------------+-------------+
| all-in-one-wp-migration | inactive | none | 7.105 | | off |
| all-in-one-seo-pack | inactive | none | 4.9.7.2 | | off |
| pojo-accessibility | active | none | 4.1.2 | | on |
| better-payment | inactive | none | 2.1.2 | | off |
| better-search-replace | inactive | none | 1.4.10 | | on |
| duplicate-page | inactive | none | 4.5.9 | | off |
| elementor | active | none | 4.1.1 | | off |
| elementor-pro | active | none | 4.1.0 | | off |
| forminator | active | none | 1.54.0 | | on |
| give | active | none | 4.15.3 | | on |
| image-optimization | active | none | 1.7.4 | | on |
| mailpoet | active | none | 5.28.0 | | off |
| optinmonster | inactive | none | 2.16.24 | | off |
| reftagger | active | none | 2.4.7 | | on |
| sf-media | active | none | 1.3.4 | | on |
| google-site-kit | active | available | 1.179.0 | 1.180.0 | off |
| site-mailer | inactive | none | 1.4.4 | | off |
| sliced-invoices | inactive | none | 3.10.0 | | off |
| analogwp-templates | active | none | 2.6.5 | | off |
| the-events-calendar | active | none | 6.16.3 | | off |
| boldgrid-backup | inactive | none | 1.17.2 | | off |
| userfeedback-lite | inactive | none | 1.11.2 | | off |
| w3-total-cache | active | none | 2.9.4 | | on |
| wp-file-manager | inactive | none | 8.0.4 | | off |
| wpforms-lite | active | none | 1.10.1 | | on |
| wp-mail-smtp | active | none | 4.8.0 | | on |
| wp-statistics | active | none | 14.16.8 | | on |
| wpvulnerability | active | none | 5.0.0 | | on |
| wordpress-seo | active | none | 27.7 | | on |
| advanced-cache.php | dropin | | | | off |
+---------------------------+----------+-----------+---------+----------------+-------------+
Andy wpcli command results in an error without "--skip-plugins":
wp plugin list
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory
...
Describe how other contributors can replicate this bug
- Install many many plugins
- Try a wp cli command.
Describe what you expect as the correct outcome
WPCLI should run and run without exceeding memory limit while the site itself isn't hitting the limit.
Let us know what environment you are running this on
OS: Linux 4.18.0-553.80.1.el8_10.x86_64 #1 SMP Mon Oct 20 03:57:49 EDT 2025 x86_64
Shell: /usr/local/cpanel/bin/jailshell
PHP binary: /opt/cpanel/ea-php84/root/usr/bin/php
PHP version: 8.4.21
php.ini used: /opt/cpanel/ea-php84/root/etc/php.ini
MySQL binary: /usr/bin/mariadb
MySQL version: mariadb Ver 15.1 Distrib 10.11.18-MariaDB, for Linux (x86_64) using readline 5.1
SQL modes:
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: phar:///usr/local/cpanel/3rdparty/share/cpanel-wp-cli/wp-cli.phar
WP-CLI packages dir: /home/.../.wp-cli/packages/
WP-CLI cache dir: /home/sf927076/.wp-cli/cache
WP-CLI global config: /home/.../.wp-cli/config.yml
WP-CLI project config:
WP-CLI version: 2.12.0
Provide a possible solution
There doesn't seem to be a solution other than temporarily disabling some plugins. The website/dashboard doesn't seem to have the issue.
Provide additional context/screenshots
N/A
- Lenguaje dominante
- PHP
- Estrellas
- 5.2k
- Forks
- 1k
- Merge medio
- 2 h 29 min
- PR fusionados (30 d)
- 7
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de wp-cli/wp-cli
-
command:cli
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
-
Release checklist for v3.0.0 Abiertocommand:maintenance
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Add changelog for updates Abiertocommand:cli-check-update command:cli-update scope:distribution
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
-
scope:distribution
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Proxy settings being ignored Abiertointernal-api:wp-cli-utils-http-request scope:documentation
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Todos los issues de wp-cli/wp-cli
Issues similares
-
sync-en
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
sync-en
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
Перевод устарел
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
status/awaiting_triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Issue: ready for confirmation Reported on 2.4.x
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100