uploads - upload_max_size doesn't change

admin2025-06-05  3

I need to increase the max size for media. I've change my php.ini. I've change my .htaccess I've change my functions.php

And it's not working.

I've directly change (for try & test) the wp-include/media.php file like this :

function wp_max_upload_size() {

    @ini_set( 'upload_max_size' , '64M' );
    @ini_set( 'post_max_size', '64M');
    $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
    $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );

    if(isset($_GET['mathieu'])) {
        var_dump($u_bytes);
        var_dump($p_bytes);
    }
    return apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );
}

In the backoffice, I see :

I've no idea ...

I need to increase the max size for media. I've change my php.ini. I've change my .htaccess I've change my functions.php

And it's not working.

I've directly change (for try & test) the wp-include/media.php file like this :

function wp_max_upload_size() {

    @ini_set( 'upload_max_size' , '64M' );
    @ini_set( 'post_max_size', '64M');
    $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
    $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );

    if(isset($_GET['mathieu'])) {
        var_dump($u_bytes);
        var_dump($p_bytes);
    }
    return apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );
}

In the backoffice, I see :

I've no idea ...

Share Improve this question asked Jun 21, 2017 at 9:48 XenofexsXenofexs 1113 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

I've find the problem. It's multisite WP. The settings need to be set in the multisite admin panel.

https://codex.wordpress/Network_Admin_Settings_Screen

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749107725a316426.html

最新回复(0)