ad

How to Increase the Maximum Upload File Size Limit in WordPress: Fix upload_max_filesize Error

Increase the Maximum Upload File Size Limit in WordPress

WordPress is a PHP based content management system. So, it needs PHP enabled web server to run. PHP settings also affect the performance of WordPress on different web hosts. File upload size limit is also one of the features that depend on the web hosting configuration. Each web hosting provider has a maximum upload size limit for their servers. If the file you are trying to upload exceeds that limit, script throws upload_max_filesize Error.

In WordPress, you can upload media files and attach them to your post. But there is the limit of the maximum upload size. This depends on the upload limit added by your web host. Few hosts only allow as low as 1 MB file size. This size is sufficient if your blog does not need high-quality images or videos. But what if you want to increase the file upload size limit? In this post, we are adding a few ways of increasing the max upload file size limit in WordPress.

Increase the Maximum Upload File Size Limit in WordPress

These methods may not work for a few web hosts. If you are unable to resolve the problem after following all the given ways, you will have to contact your web hosting provider. Good web hosts like Hostgator and BlueHost will provide good customer support.

Ways to Fix upload_max_filesize Error WordPress

Here are some ways to fix upload_max_filesiz error WordPress and increase the maximum file upload size in WordPress. You need to try these methods one by one and see if the method worked. There is no need to try all.

1. Functions.php Method

Use the three lines given below and add them at the top of functions.php file. And then try uploading large files in your WordPress blog.

@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );

2. Htaccess method

You can also try the htaccess method. You only need to add given lines in the .htaccess file. It can be found in the root directory. Be sure to take the backup of this file before doing any changes. If you are unable to find this file in the root directory, show hidden files.

Add these lines

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Update php.ini to Fix the upload_max_filesize Error

If you are using VPS, then you can try editing the php.ini to resolve upload_max_filesize Error. This method may also work on a few shared web hosting providers but not all shared hosting let uses update php.ini settings.

In your CPanel dashboard, look for the “MultiPHP INI Editor” option. This is what I get in my VPS hosting.

Upload File Size Limit in WordPress

Clicking on this asks me to select the location. It is because I have multiple domains installed and I need to select the domain for which I want to update the php.ini file. After selecting the domain, it shows the options I can change in php.ini. It shows the option to change upload_max_filesize.

Fix upload_max_filesize Error

In my server, the limit is set to 64MB. You can change this value in your server to have any comfortable value meeting your needs.

3. Plugin way

If you think that you are not brave enough to modify files, you can try plugin way. Install Max Upload Size plugin and it will increase the file size upload limit to the value you enter.

This plugin is really easy to use. Just install and activate the plugin on your WordPress website. It will also add a settings panel where you can enter the value you want to set for upload_max_filesize.

Wrap Up

Try these methods and see what worked for you. Try these ways in the given order. If all these methods are not working, it means your web host has disabled all the ways to increase the file upload size limit of your hosting account. So, you need to contact your hosting support team to fix upload_max_filesize Error.

Nord VPN Sale

Deepanker Verma is the founder of Techlomedia. He is a tech blogger, developer and gadget freak.


Similar Articles

1 Comments

Leave a comment

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.

2020 UseThisTip Developed By Deepanker