• Resolved inspiredmind

    (@inspiredmind)


    I have multiple WP sites with the same host, in the same server environment.

    One of these sites absolutely refuses to let me increase the WP memory limit. I’ve tried the usual methods (i.e. define(‘WP_MEMORY_LIMIT’,’256M’); in the wp-settings.php file).

    Other sites, on the same server, don’t have this issue.

    Is there any other setting, in the DB or otherwise, that might affect this limit?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    A fair amount of hosting provider’s actually block that method.

    Here are three other ways to increase PHP’s memory allocation:

    1. If you can edit or override the system php.ini file, increase the memory limit. For example, memory_limit = 256M

    2. If you cannot edit or override the system php.ini file, add php_value memory_limit 256M to your .htaccess file.

    3. If neither of these work, it’s time to ask your hosting provider to temporarily increase PHP’s memory allocation on your account. Keep in mind that most decent hosting providers allocate 32 MB to PHP under each account, and most decent hosting providers allow users to temporarily increase the memory allocation. If your hosting provider won’t accommodate you, perhaps it’s time to find a new hosting provider.

    (in the above examples, the limit is set to 256MB)

    Thread Starter inspiredmind

    (@inspiredmind)

    Hi James,
    Thanks for responding.

    I have no issue raising the PHP memory limit.

    This issue is specifically the WP memory allocation. As defined by WP_MEMORY_LIMIT.

    It is locked in at 40MB, even though PHP has 512MB available.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Try removing the define('WP_MEMORY_LIMIT line. By default, WordPress will use as much memory as it needs to within the allocated PHP memory.

    Also, what are you using to determine that WordPress is locked at 40MB?

    Thread Starter inspiredmind

    (@inspiredmind)

    Solved it. Major oversight.
    There was a comment in the wp-config.php that was not closed. Duh.
    Case closed. Sigh of relief.

    Thread Starter inspiredmind

    (@inspiredmind)

    Also, what are you using to determine that WordPress is locked at 40MB?

    There are numerous plugins, even some themes, that display the WP MEMORY LIMIT. For instance, AVADA theme has a server status page that displays this. Also the plugin **Server IP & Memory Usage Display** displays it (as do a few others).

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Perfect, I’m glad you found the problem. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Unexplainably, can't increase WP memory limit’ is closed to new replies.