Skip to content

Introduction: This guide explains how to update the custom PHP memory_limit setting in DirectAdmin to allow higher memory limits, up to 8192M.

Steps:

  1. Navigate to the template directory:

    bash

    cd /usr/local/directadmin/data/templates/
  2. Copy the php_settings.json to the custom directory:

    bash

    cp php_settings.json custom/
  3. Change to the custom directory:

    bash

    cd custom/
  4. Edit the php_settings.json file:

    bash

    nano php_settings.json
  5. Update the memory_limit section to include higher values:

    json

    {
    "memory_limit" : {
    "default" : "128M",
    "type" : "list",
    "values" : [
    "64M",
    "128M",
    "192M",
    "256M",
    "368M",
    "512M",
    "768M",
    "1024M",
    "2048M",
    "4096M",
    "8192M"
    ]
    }
    }
  6. Save and exit the editor:

    • Press CTRL + X to exit.
    • Press Y to confirm the changes.
    • Press Enter to save the file.

Conclusion: By following these steps, you can allow DirectAdmin clients to select higher memory limits for their PHP configurations.