Configure PHP memory limit

,

Before we show you how you can individually set the PHP memory limit per customer and website on our full-managed servers, first a few informations:

Why do I need a PHP memory limit at all?

PHP always reserves a part of the RAM for executing scripts. How much RAM can be reserved for this is defined with the PHP memory limit.
If there would be no limit, a bad script could cause the memory to fill up slowly but surely, so that the speed of the web pages becomes much slower and in the end even the whole server can become unstable.

How high should the PHP memory limit be?

Unfortunately it is not possible to give a general answer.

It depends on which CMS you use and how many applications you have installed there. The values vary from 32 MB for a simple WordPress installation up to 512 MB for a complex shopware installation

For this reason we do not set such a high limit, so that any kind of CMS can get along with it (WordPress needs less than shopware).

Setting the PHP memory limit for a website

If you open the settings of a website ( similarly of course also for sub vhost and alias domain vhost), you can set the limit directly.

If you enter a 0 here, the limit is automatically set to the value of the server or to the value of the used webserver configuration, if you have also defined PHP settings here.

Please note that the “Individual php.ini settings” always have priority. If you have entered a different limit there, this value will be taken as long as it is not greater than the defined limit. The same applies to a memory limit that you have set in the direct (web server configuration).

Setting the PHP memory limit for a client

If you don’t want your customers to enter arbitrarily high values for their websites, you can also assign a limit to each customer. This limit behaves in the same way as the website memory limit: the customer can distribute “his” limit to all pages individually.