Site icon WP Artists

How to Increase the WordPress Upload Limit

wordpress

Trouble uploading files to your WordPress site? Searching for a quick fix? Want to increase WordPress Upload limit? Facing the “exceeds the maximum upload size for this site” error while uploading an HTML file? Well, although the problem is quite common, yet this is frustrating.

First of all, it is important to understand that error doesn’t occur due to a WordPress issue. Mostly, it is due to settings at the server level. For the sake of security and effectiveness, some servers set an upload limit, to prevent the users from flooding the website with huge videos. So, it is clear that you can’t resolve it on WordPress.

Well, that’s quite fair, but nowadays many servers set a limit of 2 or 5 MB by default. Let us see how we can go about increasing the upload size.

First, let’s see how to check the ‘Maximum File Upload Size‘ limit in WordPress.

How to Check Your Maximum File Upload Size Limit in WordPress?

It is a really simple process. The maximum file upload size limit is automatically shown in WordPress at the bottom while uploading images or media. You can simply check that out by logging in Dashboard. Go to Media » Add New page and you will see the maximum file upload size limit for your WordPress site at the bottom.

Now that you have seen the maximum upload size in WordPress, let’s see how to increase the limit.

1: Edit functions.php File

You can also increase the WordPress Upload limit by editing the WordPress theme files. You can try that in case, you are not able to access your .htaccess file. You can try adding the following lines of code in the functions.php file of your theme:

@ini_set( ‘upload_max_size’ , ’64M’ );

@ini_set( ‘post_max_size’, ’64M’);

@ini_set( ‘max_execution_time’, ‘300’ );

Please note that while you change the theme, the maximum upload size will restore to its default values. You must then edit the functions.php file of the new theme.

Also, remember if you change the theme, then maximum upload size will return to its default values until you edit the functions.php file of the new theme. You can also check out the video of the process.

2. Create or Edit an existing PHP.INI file

To edit an existing PHP.INI file, you must access your WordPress site’s root folder by using FTP or File Manager app in your hosting account’s cPanel dashboard.

If you are on a shared host, like in most cases, then you will not be able to see a php.ini file in your directory. If you cannot see one, then create a file named php.ini and upload it in the root folder. After that, add the following code in that file:

upload_max_filesize = 64M

post_max_size = 64M

max_execution_time = 300

Note that if the figure 64 does not work, then try putting in 10MB (that might work possible).

3. .htaccess Method

If your web server is using Apache and PHP is set as an Apache module, you can try to increase the maximum upload size in WordPress by modifying the .htaccess file in the root directory. All you have to do is, to edit the .htaccess file in your WordPress site’s root folder and add the following code:

php_value upload_max_filesize 64M

php_value post_max_size 64M

php_value max_execution_time 300

php_value max_input_time 300

This will define the max upload size in Megabytes. You must change the numbers as per your requirement. The max execution time and max input time will be in seconds. The execution time is the limit of time spent on a single script. You must select a figure that is suitable for your site.

4. Increase Upload Size in Multisite

If you are running WordPress multisite, you can easily increase the upload size from the settings. The limit up to which you can increase the upload size depends purely on the settings in your server. If your server is set to 100MB, you cannot increase WordPress upload size to 125MB. However, if your server is set to 50MB, then you can resolve the error by increasing the upload size to the maximum limit that is 100MB.

To increase the max upload size on your Multisite, follow these steps:

Step 1

Log in your WordPress dashboard click into Network Admin and then into the Settings.

Step 2

Scroll down and double-check the “Max upload file size” settings. In the image, you can see that this is set to 1500 KB (1.5 MB). You can change this to something higher than the default. You can also set it to the maximum limit. After you have made the changes click on “Save Changes.”

So that’s all! Solving the WordPress upload limit is very simple. You can try these methods and you are ready to go!

Exit mobile version