We’ve moved a lot of client sites, and sometimes a WordPress memory runs out of errors when a new plugin is activated or doing some other task. The usual errors are as follows:

Fatal error: Allowed memory size of 33554432 bytes exhausted 
(tried to allocate 2348617 bytes) in
 /home4/xxx/public_html/wp-includes/plugin.php on line xxx

We received an e-mail from a user facing the same problem, so we decided to do a write because this is a common problem. This error occurs because you have exceeded the default memory limit. There are many solutions, but in this article, we will share the simplest one.

First open up your wp-config.php which is located in the root WordPress directory. Then add the following line to the main php tag:

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


We will only increase the memory limit to 128M. If you still receive an error after this fix, contact your host. Most likely, they have to increase your memory limit in their php.ini file. If you have other ways to increase the memory limit, let us know in the comments below.