How to increase the Default File Upload Size Limit in WordPress

Can’t upload your media file in WordPress? A common problem of bloggers when working with WordPress is when the media file size exceeds the upload limit size.The good news is just like you can increase the WordPress PHP memory limit, you can also change the file upload size limit as well.

WordPress install has a constraint on maximum file size for uploads. If you want to know what your site’s upload limit is, you can visit Media -> Add New. Below the upload box you will see “Maximum upload file size” with a number next to it, in megabytes.

upload new media

upload new media

Edit or create php.ini file

If you use cPanel, go to the Files section and click on the File Manager button. Make sure the checkbox for Show Hidden Files is checked and then click Go.

Select your wp-admin folder and find a file called php.ini. In most cases if you are on a shared host, you will not see a php.ini file in your directory. If you do not see one, then create a file called php.ini in your wp-admin folder.

Open the php.ini file add the following code:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
If you have to change the value 64 to 128. After editing, you will see that the upload media size has changed to 128 MB.

 HTaccess method

In this method, you’ll be editing the root directory of your .htaccess file. This method is working for many of the users out there.

The first things you need to do is to download a program that can access your WordPress file called FTP program. Using this program, you can access the htaccess file. Filezilla is an FTP program which is an open source software distributed free of charge under the terms of the GNU General Public License.

edit htaccess file

Edit htaccess file


Paste the following code into .hatcess file and then Save the file.

 php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
After that, your maximum upload file size will have been increased, and you can upload any media file up to 64 MB.

Change Theme functions file

This is the third method that will let you change the maximum upload file size limit. In this method, you have to make changes in theme functions. First of all, go to your WordPress dashboard and then Click on Appearance from the left bar. After that Click on Editor. Now you need to paste the following code in the functions.php.

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


So you can see there is not just one solution for increasing the default upload size limit in WordPress. How you actually go about increasing the upload limit of your install depends on how your server is configured. If any of the solutions works, uploading large media files won’t be an issue anymore. These changes shouldn’t take more than a few minutes to take effect so you can quickly get back to work.

If none of the above solutions work for you, you can contact your web host. File uploading size setting is actually controlled by the hosting account. Tell them you want to increase the “memory_limit”, “upload_max_size” and “post_max_size” in your php.ini file. Generally, web hosting services don’t have a problem doing this.



Author at onlineshouter
Christine writes for people who seek for knowledge about SEO, blogging, online marketing, gadgets and web apps.

Leave a Reply

Your email address will not be published.