Download Yii 2

Composer is the recommended way to install Yii. If it is not installed yet, follow the instructions on the Composer website.

Latest release: 2.0.55 · May 9, 2026

Install with Composer Recommended

Choose an application template.

Basic application

Recommended when getting started with Yii.

php composer.phar create-project yiisoft/yii2-app-basic basic

Continue with the introduction in the Definitive Guide.

Advanced application

For applications with distinct frontend and backend environments.

php composer.phar create-project yiisoft/yii2-app-advanced advanced

After installation, read the advanced template documentation.

Read the installation guide.

Other installation methods

Download a template and extract it into a web-accessible directory.

After extracting the archive, follow the introduction in the Definitive Guide, or read the advanced template documentation.

Verify download integrity

Copy the SHA256 hash from the GitHub releases page and verify the downloaded archive.

Linux and macOS

echo "EXPECTED_HASH  yii-basic-app-2.0.55.tgz" | sha256sum -c

Windows

$expectedHash = "EXPECTED_HASH"
$actualHash = (Get-FileHash yii-basic-app-2.0.55.tgz -Algorithm SHA256).Hash.ToLower()
if ($expectedHash -eq $actualHash) { "✓ Verification successful" } else { "✗ Verification failed" }

Replace EXPECTED_HASH with the actual hash. If verification fails, download the file again.

Upgrade from older versions

For a Composer installation of Yii 2.0.x, run this command in the project root:

php composer.phar update yiisoft/yii2 yiisoft/yii2-composer bower-asset/jquery.inputmask

Upgrades may require application changes, so always read the UPGRADE notes. They also contain more detailed Composer upgrade instructions.

For an archive installation, either migrate to Composer as described above or download the new release and replace the contents of your application's vendor/ directory.

Upgrading from Yii 1.1 is not trivial and requires rewriting a large part of the application. See Upgrading from Yii 1.1 for details.

Documentation

Download the Guide and API documentation for offline use.