How to increase WordPress maximum upload size

As default, many WorePress installations have a limit of 32MB maximum file upload limit for uploading via the media manager. To see what your maximum upload file size is, log into your WordPress site, go to your media library, and click ‘add new’. Often you’ll see ‘Maximum upload file size: 32 MB’ or similar depending on your defaults.

Increasing the ‘maximum upload file size’ for your media library isn’t always straight forward or easy but here in this post there are some options to try.

Please note that if your site is hosted on a shared host then the global server settings may be the only way to increase limits. If this is the case you need to contact your web hosting provider. Need a new hosting provider? Call us on 0114 383 0711

Before you start, please note this tutorial is designed for people who are already very proficient at editing important server files and updating server settings. Please remember to backup everything before you start as mistakes can cause the loss of your site. Get expert help if in doubt.

Edit your theme functions file

Occasionally you’re able to change the maximum upload size by simply adding a few lines of code to your WordPress functions.php file:

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

Edit your server PHP settings

If your functions file hasn’t fixed things, you can try changing your PHP settings directly on the server:

Edit your PHP.INI file

If you’re able to access your PHP.INI file (located in your WordPress site’s root folder) you can add the following. If you’re on a shared host, thought, it’s unlikely you’ll be able to access this so instead create a file called PHP.INI, add the following, and upload it to the site root:

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Edit your site’s .HTACCESS file

If you’re familiar with the HTACCESS file you can try adding the following which works for some WordPress installations. Add the following:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

You may need to enable server side filtering to view this file by FTP

Still not working?

Give us a call on 0114 383 0711 and we’ll see if we can help you