Skip to content

Instantly share code, notes, and snippets.

@Willem-Siebe
Last active September 3, 2019 19:15
Show Gist options
  • Save Willem-Siebe/8a7d17c5f82859129f32 to your computer and use it in GitHub Desktop.
Save Willem-Siebe/8a7d17c5f82859129f32 to your computer and use it in GitHub Desktop.
Increase WP_MEMORY_LIMIT. See: http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP. PDF Invoices plugin (http://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/) needs 128MB for optimal performance. WooCommerce needs 64MB.
/** Increase PHP Memory, see https://gist.github.com/Willem-Siebe/8a7d17c5f82859129f32.
*
* Please note, this has to be put before wp-settings.php inclusion.
*/
define( 'WP_MEMORY_LIMIT', '128M' );
// Administration tasks require much memory than usual operation. When in the administration area, the memory can be increased or decreased from the WP_MEMORY_LIMIT by defining WP_MAX_MEMORY_LIMIT.
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
@Willem-Siebe
Copy link
Author

See codex here: http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP, added some comments in snippet based on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment