Support » Plugin: WooCommerce » [Plugin: WooCommerce – excelling eCommerce] What is ideal PHP memory for WooCommerce?

  • What is the optimum PHP memory for WooCommerce?
    And how should I apply it?
    If I can persuade my host to change the PHP.ini file, how much should I ask him to increase the memory limit to? 128MB? 256MB?
    Is there a downside to allocating more memory either for me or my host?
    Also, even if I can get my host to increase the PHP.ini memory, should I also amend my wp-config.php file by adding, say:
    define('WP_MEMORY_LIMIT', '128M');
    Should this be lower than the PHP.ini file memory size?

    Here is the background to my question:
    I have a WordPress / WooCommerce site using the Mystile theme.
    I’m currently getting worrying dashboard messages saying:
    Fatal error: Out of memory (allocated 28049408) (tried to allocate 1245184 bytes) in /home/n/o/notary/public_html/wp-includes/class-simplepie.php on line 5416
    and also am unable to use 2 plugins because of ‘out of memory’ messages.
    I’m not sure if any of this relates to WooCommerce but I read somewhere that WooCommerce often requires more memory. I think I’m going to have to change host but I need to know exactly what I should be asking for first.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author royho


    There is really no “optimum” PHP memory setting. It is always more the better. And yes ecommerce systems tend to take up more memory and this is not specific to just WooCommerce but in general.

    So your safe bet is to ask your host to increase it to 128mb or 64mb at the least. Most host will not let you increase it more than 128mb on a shared environment though. But doesn’t hurt to ask.

    And yes, if your host is increasing it in your php.ini file, then you don’t really need to define it inside your wp-config file. But leaving it is fine as well…

    Many thanks Royho
    Thats just what I needed to know


    My hosting account’s set for 128MB already but WooCommerce can only see 32MB of it! Any ideas why this is??

    I’m not really using the cart functionality, though…my site’s more a “catalog” and not a “shop” so maybe the discrepancy doesn’t matter….

    Plugin Author royho


    If your site does not throw any errors in regards to memory then don’t worry about it. Fix it when it crops up.

    Just to follow up from my original post:

    I ended up transferring my site to a different host (EvoHosting) whereupon the alarming Fatal error messages stopped and I was able to use the 2 plugins. EvoHosting’s PHP is set to 128MB.

    Strangely, the host I left (which I won’t name) insisted that their PHP was set to 256MB!

    In response to, I would say that although everything seems to be working fine now, I am still getting the same message that I had before in WooCommerce Settings:

    WP Memory Limit 32MB – We recommend setting memory to at least 64MB. See: Increasing memory allocated to PHP

    As royho says, I’m happy to ignore it – but I assume this is a fault with WooCommerce?

    Plugin Author royho


    Or you can always try putting this in your wp_config.php file

    define(‘WP_MEMORY_LIMIT’, ’64M’); or 128M if you like…But does not work for every hosting…

    it’s work for me, but you forgot to mention change the WP DEBUG
    define(‘WP_DEBUG’, true);

    hope this help another people

    Roy Ho


    @buditanrim – why would you want to turn on debug? For others out there, DO NOT turn on debug unless you know what you’re doing and it is on a private staging server or you will give out sensitive server information when your application throws an error.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WooCommerce – excelling eCommerce] What is ideal PHP memory for WooCommerce?’ is closed to new replies.