0
votes

I have a WordPress Network-Site (with currently one page). The big problem is, that the max upload size for media is limited to 1MB inside WordPress.

None of my attempts increasing this limit have succeeded.

What I've tried so far:

  • Increasing the upload_max_filesize AND post_max_size to a value > 1
  • Adding define('WP_MEMORY_LIMIT', '100M'); to wp-config.php
  • Adding a rules to my .htaccess to overwrite the initial php.ini settings
  • Adding php directives to overwrite initial php.ini settings
  • Applying apply_filters ( 'upload_size_limit', 50000, 50000, 50000 ) to my functions.php manually

The server reloads the php.ini automatically within a specific time period. By running phpinfo(), php confirms that change.

A WordPress Plugin (Revo Slider) has a builtin upload-size-check and it detects the change, too.

A look in wp-includes/media.php says:

    function wp_max_upload_size() {
    $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
    $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );

    /**
     * Filter the maximum upload size allowed in php.ini.
     *
     * @since 2.5.0
     *
     * @param int $size    Max upload size limit in bytes.
     * @param int $u_bytes Maximum upload filesize in bytes.
     * @param int $p_bytes Maximum size of POST data in bytes.
     */
    return apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );
}

Any ideas on that?

2

2 Answers

0
votes

Okay, I've found the answer myself:

When installing a WordPress Multisite instance, you have to manually increase the max. upload size on the Network-Settings page...

0
votes

If you have installed WP Multisite Go to Network Admin -> settings page,

Specify Max upload file size in Kb (12000Kb = 12MB)