• Resolved macmacch

    (@macmacch)


    I’ve put myself in a position that I can’t seem to get out of:

    I have 600+ products in my woocommerce install. I wanted to do a bulk edit on all my products in the backed, so I updated the amount of Products displayed per page to the max (=999), in order to select them all at once.

    As soon as I did that, I got the Error:
    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in …/wp-includes/wp-db.php on line 2416

    Now I can’t access the products page on the backend anymore, I don’t know what to do. …help!

    I tried to increase the php_value memory_limit in the htaccess, to 256M and 512M, that didn’t work.

    *edit: I also tried to increase the WP_MEMORY_LIMIT in wp-config.php, didn’t work. All I need is to decrease the products displayed per page in the backend again :-/

    • This topic was modified 7 years, 9 months ago by macmacch.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You can edit php.ini under /etc and work fine….

    You could try to change the number of WooCommerce products displayed per page by adding this code to your functions.php file in your theme.

    // Display 24 products per page. Goes in functions.php
    add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 );

    You can also take a look at this thread: https://gist.github.com/jameskoster/1601682

    • This reply was modified 7 years, 9 months ago by georged8.
    Thread Starter macmacch

    (@macmacch)

    But the problem is really not on the frontend side of the website. It is only in the backend, when I got to “Products”, I get this error..

    Thread Starter macmacch

    (@macmacch)

    Nevermind, I just dropped the database and reuploaded a backup, that fixed it. Happy I had a backup!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Memory Error when displaying large amount of posts per page in the backend’ is closed to new replies.