Increase WordPress multisite Max Upload Size

I am trying to increase the maximum file size for a multitask installation of WordPress (currently 1 MB). I tried several things to no avail. What I tried:

Adding these files to my php.ini hosts:

memory_limit = 300M post_max_size = 32M upload_max_filesize = 32M 

Add them to the functions.php file in the subject:

 @ini_set('upload_max_size' , '32M'); @ini_set('post_max_size', '32M'); @ini_set('max_execution_time', '300'); 

Add them to your .htaccess file:

 php_value upload_max_filesize 32M php_value post_max_size 32M 

I even tried to check wp-includes / default-constants.php.

Interestingly, I have another WordPress installation (not multisite) on the same server, which seems to work fine (maximum load - 32 MB). Any ideas what to try next?

Thanks.

+7
php wordpress php-ini
source share
6 answers

Figured it out. In all my infinite wisdom, I completely skipped the "Maximum upload file size" setting in "Network Administrator"> "Settings"> "Network Settings". This is located right near the bottom of the page.

+19
source share

Phil is right: Network Admin (My Sites> Network Admin), then go to "Settings"> "Network Settings." It is located at the bottom of the "Download Settings" section, called the maximum download file size.

However, also note that you need to go with a flat 1000 kb or 2000 kb, etc.

I set 1500 kb and it still limited me to 1 MB, but when I increased it to 2000 KB, it allowed up to 2 MB

+2
source share

Try this, I use this filter for my Multisite and it works great

 add_filter( 'upload_size_limit', 'PBP_increase_upload' ); function PBP_increase_upload( $bytes ) { return 1048576; // 1 megabyte } 
+2
source share

@Allpnay posted the solution, just paste in functions.php:

 add_filter( 'upload_size_limit', 'PBP_increase_upload' ); function PBP_increase_upload( $bytes ) { return 1048576; // 1 megabyte } 

In my case I want 8mb, so change return 8000000; // 8 megabytes

+1
source share

Try creating a php.ini with

 memory_limit = 32M upload_max_filesize = 32M post_max_size = 32M file_uploads = On 

and save it in the wp-admin/ :) folder

If this does not work, try adding the following to wp-config.php

 define('WP_MEMORY_LIMIT', '64M'); ini_set('post_max_size', '32M'); ini_set('upload_max_filesize', '32M'); 
0
source share

Create a file called .user.ini in the root folder of Wordpress and add the following to it:

 upload_max_filesize = 64M post_max_size = 64M memory_limit = 64M max_execution_time = 300 

This fixed it for me, after everything else failed.

0
source share

All Articles