最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

uploads - upload_max_size doesn't change

matteradmin11PV0评论

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

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far