Increase maximum file upload size in WordPress
Do you want to increase the maximum file upload size in WordPress. A low file upload size limit can stop you from uploading files via media within WordPress, or cause issues installing plugins and themes. In this fix, we will show you how to easily increase the maximum file upload size in WordPress to fix this immediately.
How to check 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 it you can simply go to Media > Add New and you will see the maximum file uplaod size limit for your WordPress webssite.
3 ways to fix WordPress file upload limit
There are 3 ways to change the file upload limit, htaccess is probably the best way.
1. htaccess method
Find the .htaccess file (please see what is .htaccess if you are not sure) in the root directory, you may need to click “show hidden files”, then you can increase the maximum upload size in WordPress by adding 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
2. Create or edit an existing PHP.INI file
For this method you will need to access your WordPress site’s root folder by using an FTP client like Filezilla or File Manager in cPanel.
In most cases you will not see a php.ini file in your root directory. If you don’t, then create a file called php.ini using notepad, editplus or notepad++ and upload it to the root folder. Edit this file and add the following code:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
3. Theme functions.php
There are times where we have seen that by adding the following code to your theme’s functions.php file, preferably your child theme’s function.php file, you can increase the upload size:
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
Need a price for a new website instantly
Try our website cost calculator for free and get a price emailed to you.