0

My Wordpress installation on a shared hoster is constantly running out of memory:

The error pops up at seemingly random, for example when uploading photos or sometimes without doing anything just browsing the Admin area.

It is a very fresh installation (with little content and traffic), I receive this error no matter which Theme and which plugins I use.

I already added these lines to my config:

.htaccess

php_value memory_limit 128M

wp_config.php

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

My PHP Limit seems sufficient:

PHP Memory Limit:

memory_limit    512M    512M

HOWEVER after all this my memory monitor plugin still says:

WordPress Memory Limit: 40M

Do I have to do anything else to apply these changes?

  • 1
    have you asked your host? – Milo Mar 18 '14 at 17:34
  • About what? I asked them if I might have too few memory but they told me it's 512MB and it seems true according to the phpinfo output. The problem seems to be that the WordPress Memory Limit doesn't react to config changes (it's still 40MB despite me changing it everywhere). – Andreas Hartmann Mar 18 '14 at 17:41
1

Try

memory_limit = 128M

in php.ini. Your syntax may be wrong.

You can run a function called phpinfo to see what kind of memory allocation you really have. Make a plain text file and call it phpinfo.php and put just this line in it:

<?php phpinfo(); ?>

then put the file in the root of your server, and then go to that file with your web browser, i.e. mydomain.com/phpinfo.php

You'l see all the php info you need; scroll down for memory settings. If you get an error, that means your web hosting company won't allow phpinfo to run for security reasons.

But that will tell you what the real memory settings are and if your host is being honest. If they are, ask them how to bump memory for your account. If you only see a memory limit of 40 megs, than you're not able to change it due to their restrictions.

  • As mentioned in my question, I really do have 512MB PHP memory limit. Still, wordpress memory limit is 40MB. – Andreas Hartmann Mar 18 '14 at 18:10
  • Where/how do you see 512MB? – markratledge Mar 18 '14 at 18:10
  • in my phpinfo.php – Andreas Hartmann Mar 18 '14 at 18:13
  • memory_limit 512M 512M – Andreas Hartmann Mar 18 '14 at 18:14
  • On top of that I have a plugin telling me: WP Memory Limit: 40M PHP Memory Limit: 512M – Andreas Hartmann Mar 18 '14 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.