Skip to content

10 things WordPress Plugin developers shouldn’t do.

by Andrew McCombe on July 26th, 2011

Here are 10 things you shouldn’t do as a wordpress plugin developer:

  1. ini_set(‘memory_limit’,’16M’);
  2. ini_set(‘memory_limit’, ’32M’);
  3. ini_set(‘memory_limit’, ’64M’);
  4. ini_set(‘memory_limit’, ’128M’);
  5. ini_set(‘memory_limit’, ’256M’);
  6. ini_set(‘memory_limit’, ’512M’);
  7. ini_set(‘memory_limit’, ’1024M’);
  8. ini_set(‘memory_limit’, ’2048M);
  9. php_value memory_limit 64M
  10. php_value memory_limit 128M

Quite simply, don’t blindly allocate RAM to a process without checking if the system can have it.  A server we deployed recently had 512mb of RAM and found a plugin allocating 256mb of this to the PHP process.  No wonder the site was falling over with more than 10 visitors.

From → PHP

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS