How to Increase the WordPress Maximum Upload File Size

How to Increase Maximum Upload File Size in WordPress

Spread the love

When you are working with WordPress, you’ll have to upload the files every now and then. However, WordPress has a very low limit on upload size so you might face some errors. Luckily, there are many ways to increase WordPress maximum upload file size.

In this tutorial, we’ll learn how to increase the WordPress maximum upload file size.

Why Should you Increase the Maximum File Upload Size in WordPress?

Usually, in a new WordPress website, the pre-set maximum file upload size is only 2 MB initially. So, whenever you try to upload a file size greater than 2 MB, you’ll see your ‘filename exceeds the maximum upload size for this site’ error. The only way to solve this error is to increase the file upload size.

Check the Maximum Upload Size Limit

The maximum upload size limit might be different, depending on the settings of your WordPress hosting provider. Hence, you’ll need to check the maximum upload size limit first. In order to do so, log in to the WordPress dashboard. Then navigate to Media>> Add New. You can see the maximum upload file size limit there as shown below.

Check-upload-limit

Increase Maximum Upload File Size in WordPress

There are many ways to increase the maximum upload file size. Today we’ll discuss five methods in detail. For that, you’ll need to have access to the WordPress dashboard or cPanel provided by your hosting provider.

Note: Before we start, please backup your site. Let’s get started.

Modify PHP.ini file

PHP.ini is a very important file that contains settings for maximum upload file size, maximum execution time, upload directory, and others.  you’ll need to access your WordPress site’s root folder by using an FTP or File Manager app in your hosting account’s cPanel dashboard.

Then, locate the php.ini file in your root folder. In case you can’t find the file, just create a file called php.ini and upload it in the root folder. Next, open the php.ini file in edit mode and add the given code at the end of it.

upload_max_filesize = 256M

post_max_size = 256M

max_execution_time = 400

Modify .htaccess

Modifying .htaccess is another way to increase WordPress maximum upload file size. To do so, locate the .htaccess file. Then, open it in edit mode. Copy-paste the following code and save it. Then check whether upload limit has been increased or not form above mentioned method.

php_value upload_max_filesize 8M

php_value post_max_size 8M

php_value max_execution_time 240

php_value max_input_time 240

Modify Your WordPress Files

You can try this technique If none of the above methods worked for you. This is the alternative method to increase the upload max size. Go to WordPress dashboard>> Appearance>> Theme Editor. Then locate wpconfig.php and function.php. You can simply copy and paste the following 3 line code in the files. However, it is not safe to make changes in the WordPress core files. So, keep it as a last option.

@ini_set( ‘upload_max_size’ , ’25MB’ );

@ini_set( ‘post_max_size’, ’27MB’);

@ini_set( ‘memory_limit’, ’30MB’ )

 

Upload File Size with Plugin

If you are a beginner, using a plugin is the best method to maximize upload file size. All you have to do is install a plugin and activate it. I recommend you to try Increase Maximum Upload File Size. It will automatically increase the file upload size limit.

Choose-Maximum-Upload-size

Ask your Hosting

If you are on shared WordPress hosting then the above-mentioned method might not work for you. In that case, you can simply request your hosting provider to increase the maximum upload size for you. Hosting operators have a default option to alter the upload size.

That’s it! Now go to the media section in order to check whether the upload limit has been maximized or not.

Summary

That’s how you can increase the maximum upload file size in WordPress. Hopefully, our guide helped you to modify the upload size limit.

If you liked this article then follow us on Facebook and Twitter.

Which of the above-mentioned methods worked best for you? Let us know in the comment box below.

Other Related Articles:

 

Kriti Mandal is a professional WordPress enthusiastic and blogger. Her specialities are SEO content writing, digital marketing and more. Besides blogging, she likes to travel and read books.