How to increase memory limit

  • Posted on February 15, 2022
  • WalktailsAsked by Walktails

Hi Team,

I am not able to increase the memory limit for my website.

Can you please help me with the same.

Regards, Kanchan Singh

Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
February 15, 2022


What I would personally do is the following:

  • Start by creating a new file called info.php with the following content:
  • Save the file and then visit the file via your browser, eg

  • This will show you your PHP configuration as follows:

PHP info file

  • On that page, look for the Loaded Configuration File which will show you the exact location of your php.ini file. In my case it is:

But keep in mind that if you are using a different PHP version with a different handler the location would be different.

  • Then open that file with your favorite text editor:
sudo nano /etc/php/8.0/fpm/php.ini
  • And look for the memory_limit line and update the value accordingly:
memory_limit = 128M
  • Finally, if you are using PHP FPM you would need to restart it:
sudo systemctl restart php8.0-fpm.service

If you want to change this for your PHP CLI too, you could run php -i | grep php.ini and this will show you the location of the php.ini file for your CLI version.

Hope that this helps!