To increase the post_max_size
value (which controls the maximum size of POST data that PHP will accept) using CloudLinux Selector in Plesk, This setting is important for handling large file uploads or submitting large forms.
Follow these steps:
Step 1: Log in to Plesk
- Open your Plesk control panel by navigating to
https://your-domain.com:8443
(replaceyour-domain.com
with your actual domain or server IP address). - Enter your admin username and password to log in.
Step 2: Access PHP Settings for a Domain
- In the Plesk dashboard, navigate to the "Domains" section.
- Select the domain for which you want to increase the
post_max_size
setting. - Under the "Web Hosting" section, click on "PHP Settings".
Step 3: Open CloudLinux PHP Selector
- On the PHP Settings page, locate the "PHP Selector" or "Select PHP Version" section.
- Click on "Select PHP Version" to choose the version of PHP that you want to modify.
Step 4: Modify the post_max_size
Setting
-
After selecting the PHP version, you will be shown a list of PHP settings for that version.
-
Scroll down to find
post_max_size
. This is the setting that controls the maximum allowed size for POST data (including file uploads). -
To increase the
post_max_size
, change its value to a larger value (e.g.,64M
,128M
,256M
, etc.):- For example, to allow up to 128MB of POST data:
post_max_size = 128M
4. If you don't see post_max_size
in the list, you can add it manually in the "Additional Directives" or "Custom PHP Settings" section:
Step 5: Apply the Changes
- Once you've set the desired value for
post_max_size
, scroll down and click "Apply" or "OK" to save your changes.
Step 6: Verify the Changes
- To verify the change, create a
phpinfo.php
file in the root directory of your domain. - Create a file named
phpinfo.php
and add this code:
phpinfo();
3. Visit http://your-domain.com/phpinfo.php
in your browser.
4. Look for the post_max_size
directive in the PHP info output. It should display the new value you set (e.g., 128M
).
Step 7: Remove the phpinfo.php File (Optional)
- After verifying the changes, it's a good idea to delete the
phpinfo.php
file for security purposes.
Troubleshooting
-
If the
post_max_size
value does not take effect after following these steps, ensure that there are no other server-wide settings (such as inphp.ini
or.htaccess
) that are overriding your settings. -
Ensure that
upload_max_filesize
is also set to a value that supports the newpost_max_size
. Theupload_max_filesize
should be less than or equal to thepost_max_size
.Example:
-
By following these steps, you can easily increase the
post_max_size
value via CloudLinux Selector in Plesk, allowing your PHP environment to handle larger POST requests, such as file uploads or large form submissions.