Tweak your PHP memory settings to fix weird WordPress issues

Over time, I’ve been experiencing weird issues with my blog. Plugins worked, then stopped working. Or they’d just run really slow. Occasionally I’d get error messages saying the plugin ran out of memory, but frequently it would just do nothing.

I found a solution inside wp-config.php.

I added a line, at line 6:

define('WP_MEMORY_LIMIT', '96M');

The default, 32M, wasn’t enough for the number of plugins I have installed.

If you use a hosting service, most providers probably have a limit of 32 or 64 megs. But I have a gig of RAM and two things running on this machine, so I can give it triple the default without hurting anything or anyone.

And that fixed most of my weird problems. The others are likely due to incompatibilities with outdated plugins. Regardless, it’s better to have two broken things than six.

%d bloggers like this: