Do you have a large file that you can’t upload to WordPress due to limitations? Do you want to increase the maximum file upload size in WordPress? Some times low file upload size limit can stop you from uploading files via media uploader, or install plugins and themes. In this article, we will show you how to easily increase the maximum file upload size in WordPress to correct that issue.
How to Check Your Maximum File Upload Size Limit in WordPress?
WordPress will automatically show the maximum file upload size limit when you are uploading images or media. To check this, you can simply go to Media > Add New page and you will see the maximum file upload size limit for your WordPress site.
So how do we fix this?
In some cases you can just add the following code in theme’s functions.php file to increase the upload size:
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
Create or Edit an existing PHP.INI file. For this method you will need to access your WordPress site’s root folder by using FTP or File Manager app in your hosting account’s cPanel/Plesk dashboard.
In most cases, if you are on a shared host, then you will not see a php.ini file in your directory. If you do not see one, then create a file called php.ini and upload it in the root folder. In that file add the following code:-
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
This method is reported to work for many users. Remember if 64 doesn’t work, then try 10MB (sometimes that work).
For some, it works by updating the .htaccess file which you can find in the root directory. You can increase the maximum upload size in WordPress. 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
Again, do note that if you are on a shared hosting package then these techniques may not work. In that case, you would have to contact your web hosting provider to increase the limit for you.
We hope this article helped you increase the maximum file upload size in WordPress.
If you need any further assistance, just drop me a message in the comments below!