Get our posts emailed to you with our monthly newsletter, subscribe here.

A very common WordPress error people encounter when switching themes, activating new plugins or transferring a site to a different host is “Fatal error: Allowed memory size X of bytes exhausted“.

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 77 bytes) in /home/yoursite/public_html/ on line 1

This single error will most often stop the entire site functioning, yet the fix is predictably – simple. How to fix…

Divi WordPress Theme

Step 1

Open your file wp-config.php, this is located in the root WordPress installation directory, locate the line:

/* That's all, stop editing! Happy blogging. */

Step 2

Directly above this, copy and paste this:

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

Step 3

Save your wp-config.php file and reload your site to resolve the issue.

Doing this essentially increases your memory limit to 256M which is very handy for themes or plugins which require more resources.