My website is facing a PHP Fatal Error: Out of memory.

I had tried the following method, such as

  • Increase memory_limit to 1GB via .user.ini enter image description here
  • Add RLimitMEM max into .htaccess
  • Optimize database

Due to the error_log quite long. I uploaded it to Google Drive. PHP error_log

But the problem is occurring.

Anyone also facing this issue but managed to solve them?


  • Disable all plugins and switch to the default theme. Does it still happen? – fuxia Nov 28 '16 at 8:07
  • Currently I cannot disable all the plugins because the website is currently live. If I switch off all the plugin, I afraid the website will deface. – WeeHong Nov 28 '16 at 8:59
  • A fatal error isn't "live". :) – fuxia Nov 28 '16 at 9:01
  • After I check with the host, they said it is because of other websites consume too much memory and lead to the website got this issue. – WeeHong Nov 28 '16 at 9:27

There is four possible ways to solve this.

  1. Try adding this line to your wp-config.php file:

    define('WP_MEMORY_LIMIT', '1024M');

  2. If you have access to your PHP.ini file, change the line in PHP.ini

    memory_limit = 1024M ;

  3. Using htacess.

    php_value memory_limit 1024M

  4. if still not solve then

    Talk to your host.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.