• Phone: (03) 9369-3298   
  • Mobile: 0481-0654-51

Easily getting started - Installing Yii2

  • Errol Schmidt
  • 3rd April, 2016
Easily getting started - Installing Yii2

Brief introduction to installing Yii2 framework to a website

Using the terminal window (on OSX), first install composer.

This will install the latest version (from http://getcomposer.org/download):

php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '7228c001f88bee97506740ef0888240bd8a760b046ee16db8f4095c0d8d525f2367663f22a46b48d072c816e7fe19959') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

 

Then in the directory in which you are working, initialise it:

php composer.php

 

Then to install the correct version of yii (from http://www.yiiframework.com/download/):

Install the composer asset plugin:

php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"

 

Then the yii files:

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

 

or the advanced:

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

 

Here is an excellent tutorial on where to go next:

http://code.tutsplus.com/tutorials/how-to-program-with-yii2-getting-started--cms-22440

About the Author

eSquareNews is a design and development agency. we deal in web development and print design work.

We have been operating for greater than a decade, producing high quality work for businesses of all sizes.

We tackle each job individually and professionally, with the aim of producing high quality unique work that fits into the budget of the client. We are always available to work for you, and scale our services using local professionals as required.


Blog Categories

All Articles

All articles from eSquareNews. Articles about web design and development, opinion and news around Australia.


Case Studies and Testimonials

Real stories and examples of deisgn and web developemnt done by us and others


Design News

All recent news and updates concerning design in Australia, Melbourne and Sydney


Design Trends

Its important to keep up with the most recent trends in design and web tools. Is your website up to date?


Other Articles

Miscellaneous and other articles about the design industry


SEO News and Tips

Some of the latest news in navigating the minefield of SEO


Web Design and Development Technical

The technical side of web design. Something interesting comes up for us, I'll probably tell you about it here.


Recent News from us