Keeping Objects in Memory

This is a perfect use case for Transients. In WordPress, transients are short-lived data objects. By default, they’re persisted to the database using WordPress’ built-in WP_Object_Cache object. However, you can use a variety of caching plugins (Batcache is an outstanding one that works with Memcached) to store Transients in memory. To set a transient, call … Read more

Changing WP_MEMORY_LIMIT doesn’t affect actual memory limit

So you’ve tried setting the WP_MEMORY_LIMIT variable in the wp-config.php file, but have you tried .user.ini or .php.ini? Create one of those files (yes, with the period in front) and then use: memory_limit=30M Or whatever value you’re looking for. By default, WordPress is set to 40mb for a single installation, and 64mb for a multisite … Read more

Multiple WordPress sites eat up a lot of RAM

It’s hard to answer this given that each site is most likely different and each server is also configured differently. If these sites are individual WordPress installs then 1GB /30 sites is normal, an absolute bare minimum per site would be 32MB for apc.shm_size, this equals 960MB with no overhead. 32MB is in my opinion … Read more

PHP Fatal Error: Out of memory

There is four possible ways to solve this. Try adding this line to your wp-config.php file: define(‘WP_MEMORY_LIMIT’, ‘1024M’); If you have access to your PHP.ini file, change the line in PHP.ini memory_limit = 1024M ; Using htacess. php_value memory_limit 1024M if still not solve then Talk to your host.