Drupal requires enough PHP memory to be able to run all of its processes. If Drupal runs out of memory, it can result in PHP hanging and the Drupal server effectively ceasing to function. The result of this is a white screen appearing in your browser (also known as the White Screen of Death or WSOD) and an unusable website.
PHP controls that maximum amount of available memory through the
memory_limit setting. Increasing this value is a very common task when you are installing Drupal. While Drupal will attempt to warn you if your memory limit is too low, this is not always possible. To be safe, check the memory limit yourself.
Determining the current memory limit
Select from one of the following two methods to determine your server's current memory limit:
- Examine the
php.iniPHP configuration file (usually in
/etc) , and search for the line that specifies the memory limit:
memory_limit = 128M
The preceding value indicates that the server environment has 128MB of memory available for Drupal.
If you are using Acquia Dev Desktop, in the Config tab, under Stack configuration files, find the
php.inipath for the version of PHP that you are using, and then click the Edit next to it.
- Create a
phpinfo.phpfile in your web server's docroot with the following contents:
Because this file is in your web server's docroot, you can access it by going to
http://[site_URL]/phpinfo.phpin your browser. The displayed information includes how PHP is configured for the website and the memory limit.
Editing the memory limit value
If you've determined that the PHP memory limit is too low, you must either edit the
php.ini file and change the value to something higher, or ask your hosting provider to do so for you. The
php.ini configuration file is found in various places on different systems.
After you've edited
php.ini, you must restart the web server to apply the changes.