Cloud Service >> Knowledgebase >> How To >> How to Change PHP Memory Limit and Other PHP Parameters in DirectAdmin
submit query

Cut Hosting Costs! Submit Query Today!

How to Change PHP Memory Limit and Other PHP Parameters in DirectAdmin

Introduction

With DirectAdmin, you gain control ove­r tweaking different PHP parame­ters, like the PHP me­mory limit. This limit plays a key role in dete­rmining memory allowance for a PHP script. It also greatly aids in e­nhancing performance, ensuring a smooth we­bsite operation. This easy guide­ will shed light on how to tweak the PHP me­mory limit and other PHP configurations within DirectAdmin.

Step 1: Access the DirectAdmin Control Panel

1. Open your browser and navigate to your DirectAdmin login page.

2. Enter your username and password.

3. Click Login to access the control panel.

Step 2: Navigate to the PHP Settings

1. Once logged in, locate the Account Manager section on the main dashboard.

2. Click on Domain Setup under Account Manager.

3. Select the domain for which you want to adjust the PHP settings.

4. After selecting the domain, click on PHP Settings.

Step 3: Modifying the PHP Memory Limit

1. In the PHP Settings page, look for the Memory Limit option.

2. Enter the desired value in the memory limit field. The default value is usually 128M, but you can increase it depending on your website’s needs, e.g., 256M or 512M.

Step 4: Adjusting Other PHP Parameters

In addition to the memory limit, you can modify other PHP parameters such as:

Upload Max Filesize: This parameter controls the maximum size of files that can be uploaded via PHP scripts.

Post Max Size: Defines the maximum size for POST requests.

Max Execution Time: Specifies how long a PHP script is allowed to run before it is terminated.

To adjust these settings:

1. Find the corresponding parameter fields.

2. Enter the desired values based on your requirements.

Step 5: Save Changes

1. Once you have made all the necessary changes, scroll down to the bottom of the page.

2. Click Save to apply the changes.

3. Your new PHP settings, including the memory limit, will now be in effect.

Step 6: Verify Changes

After saving the changes, it’s essential to verify that the new settings are in effect:

Create a phpinfo() file by adding the following code to a PHP file:


PHP file

1. Upload this file to your server and access it via your browser (e.g., yourdomain.com/phpinfo.php).

2. Look for the memory_limit and other parameters to ensure they reflect the new values.

Final Thoughts

Changing the PHP memory limit and other PHP parameters in DirectAdmin is a straightforward process

Cut Hosting Costs! Submit Query Today!

Grow With Us

Let’s talk about the future, and make it happen!