Increase the memory limit for Individual Site

taker18

Verified User
Joined
Oct 18, 2021
Messages
140
Location
USA
Hi
I have been trying to change the memory limit for one single site however I tried all the possible solution i got my hand on

Notice not talking about the global which easy by "PHP setting" or HTTPD custom setting >>> domain >>>> php-fpm.conf 8.1

there are 4 box text area i tried all of them, and it change all all the sites globally.
adding the:
php_admin_value[memory_limit]=1024M


- Also I tried the add snippet to wp config file and htaccess file and finally add".user.ini
- in addition I followed https://forum.directadmin.com/threads/how-to-increase-wordpress-upload-limit.59886/
referring to #Where is my php.ini?


ok now those all are the options

I have website needs 1024 , other 512, and most of the others just 128 or 256 memory limit
what is the big deal ? how can I control each site regardless of the global is 1024 or 256

I am sure it must be simple,

The other rout is creating another user with a limited package or with different package and add domains there and control the limit of my resources.

Thank you for the help
 
it's php-fpm, you can't control limits per domain in the same account.

Only 3 choice,
- use ".user.ini" file without customize in directadmin template.
- assign domain on difference php_version ( 7.4 8.1 8.2 8.3 ) and set limits on these version.
- assign into other account.
 
it's php-fpm, you can't control limits per domain in the same account.

Only 3 choice,
- use ".user.ini" file without customize in directadmin template.
- assign domain on difference php_version ( 7.4 8.1 8.2 8.3 ) and set limits on these version.
- assign into other account.
Thank you for the Answer
1- I tried the ".user.ini" at the public HTML of the domain but never take effect , not sure create a file and set the "
memory_limit = 512M" in fact I still have it. not sure why?

3- "assign into other account." are we talking about another Admin user account ? or users and Packages ? I am the only user so I never tried other
 
1 - if there have any php_admin_value rewrite setting, .user.ini or any customize files from "public_html" directory will not take effect.
3 - you can create other user for any role you want ( admin, reseller, normal user ).

 
Odd. Have you tried the normal way?
Go to your domain's php settings:

Then in the lower right had side, you have a pulldown box and an "add" button.
In the "setting" select the "memory_limit" and then you will see the current value.
Now click the "value" below and set it to what is required and click the "add" button.

Might be required to restart php-fpm to have effect or for the user to switch forth and back php-fpm versions. But normally it should work instantly.

Edit: If you use a .user.ini you don't need the php_admin_value or something like that anymore, just use:
memory_limit = 512M
for example.
 
@Richard G
That's solution only work for per user limits. he just want per website limits, so ".user.ini" should working fine if no any php_admin_value rewrite config.
Thank you all, the issue is solved
well the key secret that you need to default the php setting, HTTBd or PHP customization that related to the memory limit . as @Ohm J said exactly than create the ".user.ini" file inside the public html than add the value that we need to chang to. it will work for every site on it's own.

thank you all for the solution
 
I would like to add that even wp-config.php started to behalf and take effect for any modifying value as well with the need to create .user.inn all after reset the php setting to default. that was realy simple but tricky
I would prefer wp-cofig.php than .user.ini for better execution all the other elements
 
Back
Top