PHP, Web Development, Yii Framework

Definition of Yii2 Aliases

Following on from this good article by @KartikV: “Yii 2.0: Yii 2 list of path aliases available with default basic and advanced app” – I recently needed to use this list to understand what goes in to each alias so that I could dupe it for compression in the console. Unfortunately, I found no reference for understanding this and the descriptions in that article are not very useful so here is my attempt.

There are a few assumptions made here:

– I have a url of “” as my base URL
– My app root is at “/srv/www/webapp” in my OS (Linux)

So here is my list:

– @app = /srv/www/webapp/frontend
– @vendor = /srv/www/webapp/frontend/config/../../vendor
– @runtime = /srv/www/webapp/frontend/runtime
– @web = /yii (from ““)
– @webroot = /srv/www/webapp/frontend/web
– @common = /srv/www/webapp/common
– @frontend = /srv/www/webapp/frontend
– @backend = /srv/www/webapp/backend
– @console = /srv/www/webapp/console


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s