Config general ActiveDataProvider

Hi, I want have this default configuration for all ActiveDataProvider:

$dataProvider = new ActiveDataProvider([

            'pagination' => [

                'defaultPageSize' => 25,



what file I need change?.

According to



you should do something like this

\Yii::$container->set('yii\data\Pagination', [

     'defaultPageSize' => 25,

     'pageSizeLimit' => [1000],


Put it in one of your entry script (config file before return or @app/web/index.php before application run) file or better make a separate file and include it (with an include in case of more defaults the code will be cleaner)

Ok thank´s,