SEOClerks

WordPress Fatal error: Out of memory - SOLVED Tutorial



Write the reason you're deleting this FAQ

WordPress Fatal error: Out of memory - SOLVED

Lately many WordPress users had problem with uploading media files to their WordPress websites and i also was in same position for number of my websites. At first solution to fix "Fatal error: Out of memory" sounded easy, but after trying numerous things i finally solved my problem, and if you ever need this for your website, here is things you could do:

Error usually show up as HTTP Error when you uploading your media files (images) and you just see not embedable blank file in your media library, or if you go other way around to upload your images, you may get error like this:

Fatal error: Out of memory (allocated 36175872) (tried to allocate 30720 bytes) in /home/XXXX/public_html/wp-includes/class-simplepie.php on line 14272

Fatal error: Out of memory (allocated 35127296) (tried to allocate 1966080 bytes) in /home/XXXX/public_html/wp-includes/class-simplepie.php on line 5427


To solve this problem, there is few solutions you can do, but first you should try this:
  • Add following line to the top of wp-config.php
define('WP_MEMORY_LIMIT', '256M');
 

In most cases this would solve your problem, but for me it didn't work so i had to go one step further and after two days of searching for another solution i finally find this, so if you need it ever, here you go:

1. Use your FTP software (or enter trough cPanel) to edit your .htaccess file.
2. Add following code to your .htaccess as separate line:
RLimitMEM max


This was only solution which worked for me to avoid all errors and thankfully being able to upload all media files without problem again to my WordPress websites. So if you ever need it, there you go, or if you not sure how to do this, feel free to hire some coder from our marketplace.

Comments

Please login or sign up to leave a comment

Join
Martinsx1
Good job and making everything possible to take care of this problem. Most people wouldn't know where to start from and would be confused to know what to do. I can remember when I had an issue with my Google Chrome connection failure to pages, it took me a while before I could fix it. But here, you have already made it easier for anyone else to take care of such problems when they experience it.



Are you sure you want to delete this post?

stbrians
SEOclerks happen to have professionals who are eager to help out with issues. Thank you for making this easier for most of us. I wouldn't know what to do in such situations



Are you sure you want to delete this post?

vhinz
Thanks for sharing this solution. I wouldn't be searching for long in the internet if the same problem will occur in my website.



Are you sure you want to delete this post?

anwebservices
Since the first solution didn't work for me, either i thought it would be more then enough to increase memory limit like that, believe me i spent 3 days and nights to find working solution (number 2). In meantime i tried few other solutions but none worked for me. So if anyone bump in such problem and first solution doesn't work, i hope they will find this post to solve the problem sooner then i did WordPress Fatal error: Out of memory - SOLVED



Are you sure you want to delete this post?

stbrians
@anwebservices You were of much help. At least most of us have benefitted.



Are you sure you want to delete this post?

NesMarcos
This is indeed a big help and a worth sharing article. I am pretty sure there are a lot who are also experiencing the same problems like ours. I experienced the same failure many times and finally you have shared an easier solution to do. Kudos!



Are you sure you want to delete this post?

stbrians
He did work smart on it. We are indebted to him for writing about it. Quite timely indeed.



Are you sure you want to delete this post?

centurion
Very much nice tips and tricks. Every word press user face this types of troubles while any body have the word press based website. This is a programmatic solution for fatal error. Is there any word press plug in which will identify this types of problems and will solve the problem by own self. That will be very much beautiful matter if there have any plug in.

.htaccess file access from FTP is the most likely solution to me.
I hope it will works.

Thanks
Centurion



Are you sure you want to delete this post?

anwebservices
Unfortunately i didn't find any such plugin for WordPress which would identify or fix problem like this. I am working as WordPress coder for years and to be honest i don't even know why this error started to appear often even when i try to upload 60KB image. There could be number of reasons, but most probably coming from web host when you have large website with a lot of data and images... However, problem with .htaccess tweak helped very good, but i spend 3 days searching internet until i found solution, so i hop this will be shortcut for many who get this kind of trouble



Are you sure you want to delete this post?

stbrians
I also wish there was a way it will solve by itself. However, there seem to be no such self solving method.



Are you sure you want to delete this post?

mark8625
Your post is really a big help. It is very informative. I would glad that you found this kind of solution that is really helpful. This is not easy am sure but you did it.



Are you sure you want to delete this post?

mitan143
Cool. That's really a life saver for somebody who's currently using wordpress. I'll take it down for future use. Well, I hope the developer would fix it already, so it would be nice and convenient when I'm already using wordpress. Then, I wouldn't be bothering anymore for that specific process. But I guess you should be aware of programming codes when you do that because if you are not so sure then you might be adding another errors to what you have already.



Are you sure you want to delete this post?

stbrians
Errors and glitches do happen online and can be stressful if you do not know how to fix them. It is good you knew how to fix this and shared it. We now know how to fix this though it has not happened to me.



Are you sure you want to delete this post?

beerthooyah
It really pays to have basic programming skills like html, c++ etc. There are many tutorials in the web on how to learn the basic coding for web design. If we really want to pursue an internet business we must take time to learn these all important skills in programming.



Are you sure you want to delete this post?

romyter013
Wow this is really worth help for us. We can use this steps in case it will happen or encounter the same message. We must master this I guess if we really decided to pushed our online business. Though we may not used it for now but I know for sure in the future this will be very helpful. Thank you for sharing this us.



Are you sure you want to delete this post?

jayjaydimson
Check your Internet or try to search the error messages on google.com, you'll probably see the solution on how to fix your concern.



Are you sure you want to delete this post?

Gilgamesh
Thank you for your concern into us that we may have future problems upon of what you have solved. We appreciate it into the fullest extent just keep up the good work in making tips and tricks that will make us to do things a lot easier.



Are you sure you want to delete this post?

theresajane
This is great, I am definitely putting this in my bookmarks. Thank you for giving us a very necessary information that we can use in the future. Surely, I would turn into this thread if ever I encounter the same problem.



Are you sure you want to delete this post?

cbrendlinger
You totally saved me. I cannot thank you enough for posting this solution. The first step failed for me, like it did for you, but the second worked like a charm. I update .htaccess and the error was resolved. Thank you!



Are you sure you want to delete this post?

totolh
I'll try with my website. Greate tips!!!



Are you sure you want to delete this post?