Yii2 Change name "My Yii Application"

(Shahzadthathal) #1

How I can change Yii2 application name"My Yii Application"

Where I update this code of line?


(Mmbalasundaram) #2

update your code in views/layouts/main.php

By default line no 34


                'brandLabel' => Yii::$app->name,

Add below code in web.php

$config = [

    'id' => 'basic',

	'name'=>'Test App',

(abed el salam) #3

from config, change id.

in basic: web.php, change id


To correctly change the name of your app you need to edit the config/main.php (if your using the advanced app you will need to change the frontend and backbend config/main.php files).


return [

	'id' => 'app-frontend',

'name'=>'Your New Name!',


Other items you can configer in the main.php file

Then you can use it wherever with


(Shahzadthathal) #5

I have installed yii2 basic. I changed name in web.php but nothing happened.

(Shahzadthathal) #6

Working now … !!


return [

        'id' => 'basic',

'name'=>'Your New Name!',


(Spiritfaer) #7

And what you have done for that new result? :face_with_raised_eyebrow: I have the same problem but your post was unuseful…

(Spiritfaer) #8

Now I understand, people like me can mix up console.php and web.php files. Be smart and modify web.php

(Ganesh Patel) #9

Update in main.php config file.


(blessing muhakichi) #10

Add a name parameter in both frontend and backend config/ main file as shown below:

return [
‘id’ => ‘app-frontend’,
‘name’ => ‘Trip Management System’, // this one
‘basePath’ => dirname(DIR),