Created: 2017.07.07
I tried to upload a 2.9MB image.
Maximum upload size: 1MB
When attempting to upload a 4MB photo into a local WordPress gallery, I receive the warning:
FILENAME exceeds the maximum upload size for this site
Changing PHP settings in functions.php.
MAMP Pro was already configured to allow uploads up to 32MB in size.
Several sites offer solutions, including editing PHP.ini
, .htaccess
and functions.php
:
- PHP File uploading of Large Files in MAMP PRO
- Is The WordPress Upload Limit Giving You Trouble? Here’s How To Change It
- How to Increase the Maximum File Upload Size in WordPress
// functions.php
@ini_set( 'memory_limit' , '64M' );
@ini_set( 'upload_max_filesize' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
Configuring the max upload file size for a multisite installation.
However none of these worked for me. My site was running inside a multi-site installation, so after poking around, I found the control in Network Settings > Upload Settings (/wp-admin/network/settings.php
):
Max upload file size:
1500
KB
I changed this to 10000MB
and uploaded the photo successfully.