November 5, 2009

PHP Memory Limit NextGEN Gallery

When uploading a set of admittedly large images using NextGEN Gallery to my WordPress site I exceeded my web hosts default memory usage allocation for PHP applications. The error was:

Follow thumbnails could not created. sample.jpg (Error : Exceed Memory limit. Require : 80.65 MByte)

This issue can be resolved by increasing the memory usage allocation at a per-plugin level for PHP applications that require more grunt than others. It’s quick and easy!

 

  1. Open /wp-content/plugins/nextgen-gallery/lib/thumbnail.inc.php with your favourite text editor (e.g. textpad, etc.)
  2. Search for @ini_set('memory_limit', '128M'); and remove the // from before @ini_set('memory_limit', '128M');
  3. Save and upload changes
  4. Go to your NextGen Gallery by clicking Gallery on the left navigation bar > Click manage Gallery > Select a gallery > Select all pictures > Select resize all images > Click OK

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>