How to Fix This Message in WordPress: Fatal error: Out of memory

  • May 09, 2018
  • Bradley Taylor

This is the dreaded message many WordPress website owners have received over the last few years. But, for those who have seen it before and have dealt with it, it is no big deal. It is just more of an annoying hassle than anything else.

For whatever reason the default memory limit for WordPress is just 32MB. If you build out your site in any substantial way you will exceed this. So, you actually have to hack your own website to increase this limit to allow your site to continue functioning. The reason I say hack your own site is because many times the WordPress functionality is totally incapacitated because of the error.

screenshot of managing files in cpanel


Using FTP file manager or by logging into your hosting and navigating to the site files you can make a quick change that will fix this problem.

  1. In the WordPress directory locate this file wp-config.php
  2. Find the following text in that file: /* That’s all, stop editing! Happy blogging. */
  3. Paste this text on the line right BEFORE that text: define(‘WP_MEMORY_LIMIT’, ‘600M’);
  4. Click save

That should resolve your problem. If it does not, contact a professional web programmer to get your site functioning properly again.

Note: If your site grows to be huge you may need to revisit this one day and change your memory limits into the thousands of megs. 9999M for example.