Suppose you are uploading an image or some files and you are getting an error that the file cannot be uploaded, then what will you do? Definitely, you will have to increase file upload size for your website. So in this tutorial, we will learn how to increase file upload size in cPanel.
This article will help you in how to increase file upload size in cPanel.
We can increase the file upload size in the following ways:
1- Using PHP Selector
2- MultiPHP INI Editor
2- Editing the .htaccess file
Now, let’s see how you can increase file upload size in DirectAdmin for different PHP versions.
Method-1 Using PHP Selector
1. Log in to your cPanel account replacing domain.com with your domain name using the login credentials provided by your hosting provider.
https://domain.com:2083 or https://domain.com/cpanel
2. On the top right corner, type “Select PHP Version” in the search bar and click on Select PHP Version.
3. On the PHP Selector page, click Options and scroll down to locate “upload_max_filesize“
4. Click on the drop-down arrow given besides the value of upload_max_filesize and select the required size.
5. Just select the size, no need to save it anywhere.
6. From here you can also set the max_execution_time, memory_limit and post_max_size as per your requirement.
Method-2 MultiPHP INI Editor
1. Login to cPanel and type “multiphp ini editor” in the search bar.
2. Select the location from the drop-down either of the home directory or a domain’s document root to open the corresponding PHP configuration.
3. Scroll down and find out for upload_max_filesize and edit the value as per your requirement.
You must click Apply to save the changes.
Note:- Here M is for MB & G for GB
Method-3 Editing the .htaccess file
1. Log in to the control panel with the correct credentials that YouStable sent to the registered email address.
2. Type “file manager” in the search bar and click on the first result.
3. Now, look for the folder that says “PUBLIC_HTML” and double-click on it to open it.
Step 4: The library of WordPress installed folders shows up on your screen, and scroll down until you find “.htaccess” in it.
4. Right-click on the .htaccess file and click Edit.
5. Copy and paste the following code and modify the values as per your requirement at the last and click save.
php_value memory_limit 512M php_value post_max_size 900M php_value upload_max_filesize 900M
Note:- Please make sure that value for post_max_size is larger or equal to upload_max_filesize
I hope you get what you were looking for.
For any questions or suggestions, just comment below.
You may also like