WordPress Fatal error: Allowed memory size of {N} bytes exhausted (tried to allocate {N} bytes)

The default allocated memory to any WordPress site can vary on your settings either at the system level (PHP Configurations) or how you set it up in WordPress.

When you get this kind of error ( Allowed memory exhausted), that means that your WordPress may no longer work with memory that’s allocated to it.

The only option would be to increase the memory limit.

There are multiple ways of doing it, but let me show you the easiest one

Open your wp-config.php file

If you have a line something similar to this

Then you will have to edit the above line and change 64M to say 256M

Basically what we are doing is to allow WordPress to use up to 256 MB system memory. Now if your system’s memory + pagecache doesn’t allow this expansion, you will need to add more memory to your server else you may potentially get other errors such as segmentation fault etc

Administration area requires much more memory to do things than that of your normal site pages, so if you put the setting below in your wp-config file, this will overwrite the WP_MEMORY_LIMIT when you are in doing tasks in WP admin area.


I hope this helps

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.