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

To increase the PHP upload_max_filesize value using CloudLinux Selector in Plesk, follow these steps. The upload_max_filesize directive controls the maximum allowed size for file uploads in PHP. Increasing this limit is often necessary when uploading larger files (e.g., media files, backups, etc.).

Follow these steps:

Step 1: Log in to Plesk

  1. 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).
  2. Enter your admin username and password to log in.

Step 2: Access PHP Settings for a Domain

  1. From the Plesk dashboard, go to the "Domains" section.
  2. Select the domain for which you want to increase the upload_max_filesize.
  3. Under the "Web Hosting" section, click on "PHP Settings".

Step 3: Open CloudLinux PHP Selector

  1. On the PHP Settings page, look for the "PHP Selector" or "Select PHP Version" section.
  2. Click on "Select PHP Version". This will allow you to choose the PHP version for your domain.

Step 4: Modify the upload_max_filesize Setting

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

  2. Scroll down to find upload_max_filesize. This is the setting that determines the maximum size of an uploaded file.

  3. To increase the upload_max_filesize, change the value to a larger size (e.g., 64M, 128M, 256M, etc.):

    • For example, to set the upload limit to 128MB:

                 upload_max_filesize = 128M

  4. If you don't see upload_max_filesize listed, you can add it manually in the "Additional Directives" or "Custom PHP Settings" section:

        upload_max_filesize = 128M

Step 5: Apply the Changes

  • After setting the desired upload_max_filesize value, scroll down and click "Apply" or "OK" to save the changes.

Step 6: Verify the Changes

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

         <?php       
           phpinfo();
         ?>            

   3. Visit http://your-domain.com/phpinfo.php in your browser.

   4. Search for the upload_max_filesize directive in the PHP information output. It should display the value you set (e.g., 128M).

Step 7: Remove the phpinfo.php File (Optional)

  • After confirming that the upload_max_filesize directive has been set correctly, it's a good practice to delete the phpinfo.php file for security purposes.

Troubleshooting

  • If the upload_max_filesize value doesn't take effect after following these steps, check if other settings like post_max_size are too small, as upload_max_filesize should be smaller than or equal to post_max_size. Both settings need to be increased for large file uploads to work properly.

         For example:

              upload_max_filesize = 128M
              post_max_size = 128M

  • Ensure there are no other configuration files (such as php.ini, .htaccess, or server-wide settings) that may override your settings.

Conclusion

By following these steps, you can easily increase the upload_max_filesize value for your domain using CloudLinux Selector in Plesk, which will allow you to upload larger files to your WordPress or other PHP-based applications. Make sure to adjust post_max_size accordingly to ensure smooth file uploads.

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