Ideal php memory for 10 wordpress installs on lamp

Posted January 20, 2017 5.2k views

I am running 10 WordPress installs on lamp server powered by Debian 8.

Server allocated RAM is 4 GB

my php.ini was 256M. then I checked free memory by free m command.

there was used memory 1.8GB free memory 2GB. not used memory up to to 2 GB.

when raised PHP memory 256 to 512 MB.

now used memory 2.5GB and free memory is 1 GB .

I did see improvement in page speed.

I want to know how much percentage of RAM other resources use like MySQL etc

What is the ideal Php Memory for 10+ WordPress installs?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers


Setting PHP’s memory limit to higher values won’t reduce the time required for execution. If PHP only needs 32MB to handle a request for a page on your site and you’ve allocated 256MB, the script will still only use 32MB. Setting this value higher than it needs to be, however, can increase the amount of RAM used by your sever needlessly (i.e it’s being wasted) and it can give run-away processes room to spiral out of control should one or more pop up.

To get a semi-accurate read on how much RAM is used per page on one of your WordPress sites, I’d recommend installing a plugin, such as the one I’ve linked to below. It’ll output this data and you’ll be able to see what your actual numbers are from one page to another.

When it comes to allocating memory, more doesn’t always mean better. You should be setting PHP to use slightly over what is absolutely required to run and then make minor adjustments as needed.

Jumping from 256MB to 512MB can and will result in out of memory errors popping up and services crashing given enough traffic or forked processes (by Apache).

Resources Needed for 10 WordPress Installations

It depends. I’d need to know more about your WordPress installations to give you a better idea. So to get the ball rolling:

1). How much traffic are they receiving per week/month right now (unique traffic)?

2). How many and what type of plugins are being ran on each installation?

3). Are any of the installations using any sort of caching plugin, or do you plan to?

4). How large are the databases?

5). Is there anything non-standard about any of the installations? (custom code, programming, advanced themes with countless options, etc – do any of them use WooCommerce or another store plugin)

Ultimately, the above is what’s going to dictate what you need right now and what you may need in the either near or distant future.

I ask for the above as I could easily host a single WordPress site on a 8-16GB droplet and saturate the resources, whereas another user could host 10-20 or maybe 30-40 on a 4-8GB droplet and do the same. There’s a lot of variables at play, so knowing as much upfront as possible will help reduce guesswork.

fINALLY REALIZED THAT it is a limit for request

Thank you