Steps to Change PHP Version in DirectAdmin
To manage PHP limits in DirectAdmin, you can adjust the PHP settings such as memory limit, max execution time, and file upload limits. Here's a step-by-step guide on how to do it:
Log in to DirectAdmin
- Open your web browser and navigate to your DirectAdmin login page, which will typically be a URL similar to https://yourdomain.com:2222. Alternatively, you can login through your Client Control Panel.
- Enter your username and password, then click "Sign in."
Navigate to "PHP Settings
- On the main dashboard, under "Extra Features" click on "Select PHP version."
Modify PHP Limits
- On the PHP Settings page, you can change your PHP version as well as manage various PHP limits. Here are some common limits you can adjust:
-
- Memory Limit (memory_limit): The maximum amount of memory a script is allowed to consume.
-
- Max Execution Time (max_execution_time): The maximum time a script is allowed to run before being terminated.
-
- Max Input Time (max_input_time): The maximum time a script is allowed to parse input data (like GET, POST, etc.).
-
- File Upload Size (upload_max_filesize): The maximum size of an uploaded file.
-
- Post Max Size (post_max_size): The maximum size of POST data allowed, which also affects file uploads.
Save Changes
- After modifying the desired PHP limits, click "Apply" to apply the changes.
Verify Changes (Optional)
- You can verify the new PHP settings by creating a phpinfo.php file in your domain's root directory. Inside the file, add the following code:
<?php
phpinfo();
?>
- Then, navigate to https://yourdomain.com/phpinfo.php in your browser to view the updated PHP settings.
Advanced Settings (Optional)
- If you have access to the DirectAdmin Admin Panel, you can adjust the PHP.ini settings directly, or modify limits for the entire server or user accounts using custom templates.
This should help you manage your PHP limits easily in DirectAdmin!