Professional Documents
Culture Documents
Yii 2
Yii 2
Yii 2
Yii is an open source project released under the terms of the BSD License. This means that
you can use Yii for free to develop either open-source or proprietary Web applications.
Currently there are two major versions of Yii: 2.0 and 1.1.
Yii 2.0
The latest version of Yii 2 is 2.0.11, released on February 1, 2017. Yii 2.0 is a complete
rewrite of Yii on top of PHP 5.4.0 as a minimum requirement but fully compatible with PHP
7.x. It is aimed to be a state-of-the-art of the new generation of PHP framework. Yii 2.0 is not
compatible with 1.1.
upgrade instructions
There are two ways to install Yii 2: using Composer, or downloading an application template.
We highly recommend you to use the former.
This is the preferred way of installing Yii 2.0. If you do not have Composer yet, you may
install it by following the instructions here.
After installing Composer, run the following command to install the Composer Asset Plugin:
Now choose one of the application templates to start installing Yii 2.0. An application
template is a package that contains a skeleton Web application written in Yii.
Note that you may be prompted to enter your GitHub username and password during the
installation process. This is normal. Just enter them and continue.
If you are upgrading from Yii 2.0.0 with composer, simply run the following commands in
your project's root directory:
First, make sure you have the latest version of the Composer Asset Plugin:
If you installed Yii using an archive file, you should download the new release file, extract it
and replace the older version with the new one.
Upgrading from Yii 1.1 is not trivial. Please refer to the guide about upgrading from Yii 1.1.
Yii 2.0 is hosted on GitHub. You are welcome to contribute to the Yii 2.0 development by
submitting issue reports or merge requests.
Yii 1.1
Yii 1.1 is currently under maintenance mode. Continued support and bug fixes for this
version will be provided until December 31, 2016. Security fixes until December 31, 2018.
git@github.com:yiisoft/yii.git
SVN Access You can also obtain the latest Yii source code via SVN using: