... Skip to main content
FixesWebsite design

Increase file upload size in WordPress

By 07/11/2019August 5th, 2022No Comments

Last Updated on 05/08/2022 by iwebsitez.com

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.

find wordpress file upload limit
Click add new in media to show the add new media page
Here shows the current file upload limit

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 64Mphp_value post_max_size 64Mphp_value max_execution_time 300php_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 = 64Mpost_max_size = 64Mmax_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' );

So there you have it! 3 ways to increase maximum file upload size in WordPress, please check our other WordPress fixes and our WordPress maintenance page for care plans.

Need a price for a new website instantly

Try our website cost calculator for free and get a price emailed to you.

Leave a Reply