Increase WordPress Memory Limit

If you encounter the “Allowed memory size exhausted” error, increase the WordPress memory limit. Add the following lines to your wp-config.php file before the “That’s all, stop editing!” line. For more on optimizing wp-config.php.

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

WP_MEMORY_LIMIT affects the frontend and WP_MAX_MEMORY_LIMIT affects the admin area. If the change does not help, your hosting provider may enforce a server-level limit.

Discussion
[  0 Comments  ]

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!