How to increase file upload size in cPanel

How to increase file upload size in cPanel

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

How to increase file upload size in cPanel 1

2. On the top right corner, type “Select PHP Version” in the search bar and click on Select PHP Version.

How to increase file upload size in cPanel 2

3. On the PHP Selector page, click Options and scroll down to locate “upload_max_filesize

How to increase file upload size in cPanel 3

4. Click on the drop-down arrow given besides the value of upload_max_filesize and select the required size.

How to increase file upload size in cPanel 4

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.

How to increase file upload size in cPanel 5

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.

How to increase file upload size in cPanel 6

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.

wp-config.php

2. Type “file manager” in the search bar and click on the first result.

wp-config.php

3. Now, look for the folder that says “PUBLIC_HTML” and double-click on it to open it.

wp-config.php

Step 4: The library of WordPress installed folders shows up on your screen, and scroll down until you find “.htaccess” in it.

How to increase file upload size in cPanel 7

4. Right-click on the .htaccess file and click Edit.

How to increase file upload size in cPanel 8

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
How to increase file upload size in cPanel 9

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

Leave A Comment