Memory limit issue on Wordpress website

  • Posted February 7, 2015

Hi guys,

I would really appreciate your help with an issue regarding the following error I have: Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /var/www/wp-includes/post.php on line 2125 I have modified the php.ini memory_limit to 1024MB, as you can see here: Please help me find a solution as I am stuck for days and I really need to make my wordpress work again (this happens on add/edit post page only).

Thank you,


Did not work. I’m just trying to upload a Wordpress theme and it’s giving me this error. The uploaded file exceeds the upload_max_filesize directive in php.ini.

Hello, I did all that and even increasing to a 2GB ram of my droplet. Now my memory limit is at 2048MB and I still get the same problem. I now have a swap of 1GB on top. Where is the problem? Normally it should work! I would really appreciate the community for helping me on this one. Thanks!

This comment has been deleted

You might try installing memcached. I just recently had a similar issue with a joomla install, and memcached seems to have fixed that:

and then:

Also, it helps to have a swap on your droplet. This guy made a simple script that will set up a swap for you:

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


I have around 35k products imported in the database. Should this be an issue?

Have you tried to add this to your wp-config.php file


yet 268435456 bytes or 268.435MB is pretty massive, you usually don’t use that much memory for WP, so maybe this is a different problem.

Can you explain step by step the process up to when you get the error. Also check your php logs for errors.


Is there anyone who can help me further on this?