Install yii2 advanced template using composer

There are two YII2 templates available:

  • Basic YII2 Application Template – a basic frontend application template.
  • Advanced YII2 Application Template – consist of common, frontend, backend and console

Below are the the steps for an easy installation of yii2-advanced template using composer

To install YII2 advanced template using composer in windows through command line the minimum requirement for YII2 is that your Web server supports PHP 5.4.0.

The installation require following steps:

1: If you don’t have composer, download it from https://getcomposer.org/Composer-Setup.exe
2: To check tthe composer is install or not use below command

 c:\composer
Composer

Composer

3: Go to your project folder like c:\xampp\htdocs and run composer command to install YII2 advanced template

c:\xampp\htdocs>composer create-project --prefer-dist yiisoft/yii2-app-advanced yourprojectfolder
c:\xampp\htdocs>cd yourprojectfolder

During installation this screen will appears

YII2

YII2

4. After this run php init command to initialize the application. The initialization will generate the entry scripts and config files for your application.

 c:\xampp\htdocs\yourprojectfolder>php init

After this running tis command this screen will appears

YII2

YII2

Then enter 0 to start with development profile

YII2

YII2

This will create the following directory sctructure

YII2

YII2

Then finally run your application

YII2

YII2

Pankaj Singh Sugara

Author Pankaj Singh Sugara

Experienced Software Engineer with a demonstrated history of working in the marketing and advertising industry. Skilled in SQL, Web Applications, PHP, WordPress, and Joomla. Strong engineering professional with a B-TECH focused in Information Technology from JCDM College of Engineering Sirsa, Haryana.

More posts by Pankaj Singh Sugara