How to Increase PHP's post_max_size value using CloudLinux's Selector in Plesk? (Video)

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 (replace your-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

  1. In the Plesk dashboard, navigate to the "Domains" section.
  2. Select the domain for which you want to increase the post_max_size setting.
  3. Under the "Web Hosting" section, click on "PHP Settings".

Step 3: Open CloudLinux PHP Selector

  1. On the PHP Settings page, locate the "PHP Selector" or "Select PHP Version" section.
  2. Click on "Select PHP Version" to choose the version of PHP that you want to modify.

Step 4: Modify the post_max_size Setting

  1. After selecting the PHP version, you will be shown a list of PHP settings for that version.

  2. Scroll down to find post_max_size. This is the setting that controls the maximum allowed size for POST data (including file uploads).

  3. 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:  

                    post_max_size = 128M

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

  1. To verify the change, create a phpinfo.php file in the root directory of your domain.
  2. Create a file named phpinfo.php and add this code:

        <?php

         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 in php.ini or .htaccess) that are overriding your settings.

  • Ensure that upload_max_filesize is also set to a value that supports the new post_max_size. The upload_max_filesize should be less than or equal to the post_max_size.

    Example:

          post_max_size = 128M

          upload_max_filesize = 128M

  • 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.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Change the PHP Version via CloudLinux Selector in Plesk? (Video)

Changing the PHP version via CloudLinux Selector in Plesk is a straightforward process. Here’s...

How to Enable ionCube Loader using CloudLinux Selector in Plesk? (Video)

Enabling ionCube Loader on your server via CloudLinux Selector in Plesk is a simple process....

How to Enable the GD extension of PHP using CloudLinux Selector in Plesk? (Video)

Enabling the GD extension for PHP using CloudLinux Selector in Plesk is a straightforward...

How to Enable the Mailparse Extension of PHP Using CloudLinux Selector in Plesk? (Video)

To enable the Mailparse extension for PHP using CloudLinux Selector in Plesk. Follow these...

How to Enable or Disable PHP Extensions Using the CloudLinux Selector in Plesk? (Video)

Enabling or disabling PHP extensions via the CloudLinux Selector in Plesk is an easy and...