How to increase memory_limit

The memory_limit setting controls how much memory a PHP script is allowed to use.

If your website shows errors such as:

Allowed memory size exhausted

you may need to increase the PHP memory limit.

Step 1: Login to DirectAdmin

Login to your hosting control panel:

https://yourdomain.com:2222

Step 2: Open Select PHP Version

In the DirectAdmin dashboard open:

Select PHP Version

Step 3: Open PHP Options

Click on the tab:

Options

This page allows you to change various PHP settings.

Step 4: Change memory_limit

Locate the setting:

memory_limit

Select the value you want to use.

Common values are:

128M
256M
512M
1024M

Click Save to apply the new limit.

Important notes

  • Increasing the memory limit may help large applications such as WordPress or Laravel
  • Setting the value too high is usually not necessary
  • If your website still shows memory errors, please contact our support team

Was this article helpful?

Share this article