Introduction: This guide explains how to update the custom PHP memory_limit setting in DirectAdmin to allow higher memory limits, up to 8192M.
Steps:
-
Navigate to the template directory:
bashcd /usr/local/directadmin/data/templates/
-
Copy the
php_settings.jsonto the custom directory:bashcp php_settings.json custom/
-
Change to the custom directory:
bashcd custom/
-
Edit the
php_settings.jsonfile:bashnano php_settings.json
-
Update the
memory_limitsection to include higher values:json{
"memory_limit" : {
"default" : "128M",
"type" : "list",
"values" : [
"64M",
"128M",
"192M",
"256M",
"368M",
"512M",
"768M",
"1024M",
"2048M",
"4096M",
"8192M"
]
}
}
-
Save and exit the editor:
- Press
CTRL + Xto exit. - Press
Yto confirm the changes. - Press
Enterto save the file.
- Press
Conclusion: By following these steps, you can allow DirectAdmin clients to select higher memory limits for their PHP configurations.
