Skip to main content

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home/xxx/public_html/wp-includes/plugin.php on line xxx

  • --PATH wp-config.php
    define( 'WP_MEMORY_LIMIT', '256M' );
    
    Using this code snippet you can increase the memory limit in wordPress. This code snippet tells wordpress to increase the PHP memory limit to 256MB. Change the value of WP_MEMORY_LIMIT to 256M ('WP_MEMORY_LIMIT', '256M') if the value already exists or copy paste code just after define( 'WP_DEBUG', true ); code. You can also increase value as per your requirement.
  • ini_set('memory_limit', '-1');
    If you have access to the php.ini file then you can increase memory limit using php.ini file otherwise you can add this code to your php script. It takes unlimited memory usage from the server.
  • Back to code snippet queries related wordpress