by : Pramod Kumar
May 28th 2015

In this article

In this read, we’ll discover the steps to install Yii 2.0 Framework in Windows.

Yii 2.0 Framework

We may install the Yii 2.0 Framework in two ways: by using Composer or by downloading an archive file. The composer method is superior since it allows you to add new extensions or upgrade your Yii simply by typing a single command.

STEPS:

1)  Install Composer:

Install Composer

Download latest version of the composer from getcomposer.org

2) Installing Yii via Composer

Yii2 is having two applications in github.com/yiisoft/yii2

  • Advanced application template
  • Basic application template

For Comparison: Check Here 

In order to install the project, just open the console in your htdocs or www folder and just write the following commands:

In order to install project, just open console in your htdocs or www folder and just write following commands:

Install Advanced Application Template
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced your_project_name
Install Basic Application Template
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic your_project_name

3. Installing Yii from an archive file involves two steps:

4. Getting started

  1. Run command init to initialize the application in a console in your project folder
  2. Create a new database and adjust DB configuration in project_folder/common/config/main-local.php
  3. Apply migrations with console command yii migrate. This will create tables needed for the application to work.

Migrations are present in project_folder/console/migrations

All done, now your project has been set up and you can access it in your browser.

Conclusion

We hope this quick read helped you in some manner. We’d like to know your thoughts in the comments down below. Need expert advice? Reach out to our team of specialists today!

About the Author

Pramod Kumar

Let’s Create Something Great Together!




    Latest Blog

    Top 30 Must-Have Features to Integrate in Your LMS For Distant Learning

    Read more

    How to Create A DAO (Decentralized Autonomous Organization)?

    Read more

    10 Ways How AI Will Improve Customer Experience in 2025

    Read more