How to Increase Max Upload File Size in WordPressEach of web hosting providers today offers different packages for different plans. Every plan has a maximum file upload limit with the Media Uploader of your page in WordPress. There are even some which offers 2MB upload size which is not sufficient enough for those media files such as video or audio. An image alone, most of the time, would take over 2MB depending on the graphics involved in the whole image. However, if you plan to upload large data like an audio or video, you would, most likely, encounter maximum limit prompt from the system. In this article, we will walk you through on how to increase max upload file size in WordPress.
4 Ways on How to Increase Max Upload File Size in WordPress
There are numerous ways that you can follow in order for you to completely increase max upload size in WordPress. The WordPress is known for its vast number of features and easy-to-navigate page – why a lot uses it. Furthermore, the current max upload size of WordPress is at 8mb.
This tutorial on How to Increase Max Upload File Size in WordPress is for intermediate level of users. Following this tutorial might not work in some hosts, by then, you would have to seek assistance from your web hosting provider directly. This particular tutorial works well with HostGator. We will be walking you through three methods that can help you on how to increase max upload file size in WordPress. So, without further ado, follow the ways below on how to increase max upload size in WordPress:
#1 Add Code on Theme Functions File
Since not all shared hosting providers have the same configuration, there might be instances when this method will not work. With this, you can expect that not all the ways that will be mentioned here will be successful. Additionally, the first way would be adding the following code in your website’s theme function’s file to increase the upload size:
@init_set( 'upload_max_size' , '64M' );
@init_set( ‘post_max_size’ , ’64M’ ); @init_set( ‘max_execution_time’ , ‘300’ );
This is not the best way, but if other fails, then you can give this is a go.
#2 Creating and Editing php.ini File
There are instances where the php.ini file is not in the directory, especially if you are on a shared host. Should this be the case, you can create a file and name it as php.ini, then upload this particular file in the root folder. How can you do this?
First, you have to go to your control panel’s file manager.
Second, open the wp-admin folder that can be found in the directory.
And finally, add a new php.ini file into this particular folder.
As follows are the line of codes that you should input into your newly created file:
upload_max_filesize = 64M post_max_size = 64M max_execution_time = 300
#3 htaccess File
.htaccess file is normally what some people would try to modify from the root directory to increase the max upload file size in WordPress. This particular file is a special hidden file which contains different settings that you can modify to change the behavior of the server to a more directory specific level.
To get started, make sure to use FTP or SSH connection. Then look through your directory in root folder and see if there is an existing .htaccess file. If there is, then open and edit that file and add the code below. Although, If it does not exist, do not worry, you can create one on your own .htaccess file containing the following code as well.
php_value upload_max_filesize 64M
php_value post_max_size 64M php_value max_execution_time 300 php_value max_input_time 300
#4 THE EASIEST AMONG THE REST!
There is no need for you to be a web developer on how to increase max upload file size in WordPress or know any technical stuff. As long as you know how to use WordPress then this will be piece of cake. Just go to the WordPress Dashboard > Plugins > Add New…
Next, type Upload Max File Size on the search bar and poof! There goes your plugin.
Lastly, a new tab on your dashboard will appear called: Max File Size. Click on that tab and input the new limit. You can just copy paste the “262144000” bytes if you don’t know how much exactly do you want the limit to be. That is converted to 250mb. Now you have 250mb Max Upload File Size.
Trying these methods is easy. If one way does not seem to work, then, you can try the other methods. You can check your WordPress page’s maximum upload file to see it for yourself. Just go to the Media section in your admin page and click on the ‘Add New’ sub-menu. Also, you will see in the bottom portion of the page that maximum upload file size, which is normally at 8Mb. Moreover, this is what you can change when you modify the settings of your page.
If you happen to have followed the methods above, and none of them works, you can undo the changes that did not work. Both the php.ini and as well as the .htaccess files are just similar to the cascading properties from the CSS. The post_max_size in the child directory is overwritten in the same directive from the parent directory.
Other than that, with a shared hosting, you would not be able to use the methods that have been mentioned in this article. In this case, you should contact your web hosting company directly for them to increase the limit for you. However, there are instances that the hosts would completely turn down their users or would ask for additional fee.