WordPress – adjust maximum memory limit

Open wp-config.php and somewhere under database settings add

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

This will definitely adjust WordPress memory limit to 256MBs. You can use higher number if needed – e.g. 512M for 512 MBs of Ram.

Make sure to adjust PHP limit as well, either in php

ini_set('memory_limit', '256M');


php_value memory_limit 256M

or php.ini directly ( it will already be in php.ini file, just look it up and change the value )

memory_limit = 256M

Write a Comment