I am getting the “Allowed memory size of [X] bytes exhausted” error in WordPress. How should I resolve it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our W3Make Forum to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
There are a number of actions you may take to fix an internal server error with WordPress.
One of the method is to optimize the images from the web you can use plugins such as smush to optimize images
The easiest way to fix this error is to increase the PHP memory limit. You can do this by adding the following code to your wp-config.php file:
define(‘WP_MEMORY_LIMIT,’256M’)
First, check out how much memory PHP assigns and look at the system info log. This should be at least 128M or, even better, 256M or more. If the memory limit is lower, you need to raise it. You can increase the PHP memory limit by editing the PHP.ini. Open the PHP.ini and find the line memory limit and change the value.