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
- 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
- From the Plesk dashboard, go to the "Domains" section.
- Select the domain for which you want to increase the
upload_max_filesize
. - Under the "Web Hosting" section, click on "PHP Settings".
Step 3: Open CloudLinux PHP Selector
- On the PHP Settings page, look for the "PHP Selector" or "Select PHP Version" section.
- 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
-
After selecting the PHP version, you will see a list of PHP settings for that version.
-
Scroll down to find
upload_max_filesize
. This is the setting that determines the maximum size of an uploaded file. -
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
- To verify the new setting, create a
phpinfo.php
file in the root directory of your domain. - 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 thephpinfo.php
file for security purposes.
Troubleshooting
- If the
upload_max_filesize
value doesn't take effect after following these steps, check if other settings likepost_max_size
are too small, asupload_max_filesize
should be smaller than or equal topost_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.