Increase el límite de memoria en WordPress
Qué significa este error?
El error Fatal error: Allowed memory size of X bytes exhausted significa que WordPress intentó usar más memory RAM of the permitida. Ocurre frecuentemente en sitios with muchos plugins, WooCommerce with muchos productos, or al importar content.
Método 1 — wp-config.php (recomendado)
Open wp-config.php en public_html and agrega before of the línea /* That's all, stop editing! */:
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');
define('WP_MAX_MEMORY_LIMIT', '512M');
Método 2 — .htaccess
Agrega in your .htaccess en public_html:
php_value memory_limit 256M
Método 3 — Selector de PHP en cPanel
- Access cPanel → Select PHP Version
- Ve a la pestaña PHP Options
- Cambia
memory_limita 256M or 512M - Save
Valuees recomendados según el type de sitio:
- Blog or sitio simple: 128M
- WordPress with plugins: 256M
- WooCommerce: 512M
- WooCommerce with muchos productos: 1G
✅ Verifyr el cambio: Instala el plugin Query Monitor for ver el usage de memory en tiempo real in the barra de administración de WordPress.