WordPress Error: Allowed Memory Size

I recently upgraded to the current version of WordPress. I am always weary about upgrading as there are many things that can go wrong. I realize that upgrading WordPress is required for bug and security fixes, but I also realize that all plugins that I use may not be compatible with the latest version.

That being said, I decided to upgrade when I had time to solve an problems. I waited for some time to see if others have had issues, and when I was satisfied, I performed the upgrade. Once the upgrade had completed, however, I ran into a problem when I accessed my plugins from the admin panel. The problem was related to memory, and it prevent me from viewing the plugins I had installed on my blog. The good news is that the fix was simple, but did take some quick searching to find.

Memory Size Issue

Wordpress Logo

As mentioned above after upgrading to the latest version of WordPress, I encountered an error that prevent me from viewing the plugins installed on my blog. The error was:

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in [directory path]/kses.php(401) : runtime-created function on line 1

This error was displayed on the page that was supposed to list my plugins. All other pages displayed fine within my WordPress dashboard except the plugins page.

I quickly turned to Google and did a search for the error message. Many results were returned, which indicated that many others have had this problem before me. After clicking one of the first links, I was taken to a page that explained how to correct the issue.

From what I can tell, it appears that WordPress has exhausted the memory limit that is specified in the “wp-settings.php” file. By default, it was set to 32 MB, and from the error message above you can see that the number is higher than the specified memory. The resolution was to increase this limit to 64 MB.

To do this I used the following steps:

  1. I logged into my host and opened up the wp-settings.php file. This file should be located off your blog’s root.
  2. I located this line:

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

    and changed it to:

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

  3. I then saved the file and closed the web browser.
  4. Next, I reopened the web browser and logged into my blog’s dashboard and was able to access the plugins page.

I’m not sure why WordPress was using much more than the specified amount, or how increasing it to 64 MB will impact my blog. I just know that it works and I have had no issues. If someone can shed more light on this, I’ll be glad to know.

Follow Me