Fatal Error: Allowed memory size of

Updated: 10/28/2016

What to do if you can’t log into your WordPress Admin page.

I had dealt with the issue of “fatal error: allowed memory size of…” with a customer’s WP site a few months ago. But recently had to deal with it on my own site. I tried the two fixes that I write about below, but it didn’t work. So I contacted support for more help. They stated that the reason it happened to begin with was because of a plug-in install. So I had to log into my cPanel to delete the plug-in.

However, the below tips are still valid solutions for fixing the error.

How to fix the “Fatal Error: Allowed Memory Size of” in WordPress

sample of a fatal error allowed memory sizeIf you are trying to get to your wp-admin dashboard and can’t continue further because you are receiving a fatal error: allowed memory size of a certain amount of megabytes like the one above, you will need to go into your cpanel for your hosting account in order to fix it.  I use HostingDomainsWeb.com* for my cpanel , but the below tips will help with various hosting companies.

If the first tip to fix the fatal error of the allowed memory doesn’t work, then try the second tip.

  1. Log into your hosting account
  2. Click on “cpanel”
  3. Click on “file manager”
  4. Expand the “public_html” folder
  5. Find the .htaccess file (if you can’t find it, look for a setting that toggles the hidden files)
  6. Edit the .htaccess file by adding a new row at the top and type in the very first line: php_value memory_limit 128M
  7. Save the .htaccess file
  8. Refresh your wp-admin screen

If the error is gone and you can log into your wp-admin dashboard and do work again, then great, everything is now fixed.  If you get a 500 error, then do the next tip.

  1. Make sure you delete the line of code you added to the .htaccess file and save the changes so that it looks like it did before you modified it.
  2. You should still be in your cpanel, if not, then log back into your cpanel
  3.  Expand the “public_html” folder
  4. Look or search for the “wp-config.php” file
  5. Edit the “wp-config.php” file by adding the following:  define( ‘WP_MEMORY_LIMIT’, ‘128M’ ); (see below for the example of where to insert this line of code)
  6. Save the “wp-config.php” file
  7. Refresh your wp-admin screen

how to fix the fatal error: allowed memory size

Hopefully one of these two tips should fix your Fatal Error: Allowed Memory Size.  I started with the first one and did get the 500 error so then after searching the web for alternate fixes, I found the second tip and it worked like a charm.

If you have other fixes to this same issue, I would love to hear about it and I will add to this post.

*Hosting Domains Web is a reseller program I use for myself and my web clients and I do receive affiliate money for offering  the services.

Leave a Reply

Your email address will not be published. Required fields are marked *