First you have to install XAMPP you can find here: XAMPP Installer
You can install Yii2 framework by two ways:
- Install Using Composer
- Install Manually
Install Using Composer
The recommended approach is to install Yii2 framework using composer, because it will automatically install and configures all the required plugins and packages. You can download composer from https://getcomposer.org/download/. Composer setup will ask for PHP installation path, in my XAMPP installation it is:D:\xampp\php\php.exe
You can verify if composer is correctly installed, by executing the command composer
in command prompt. If you get an error message, it means it is not added in the Environment Variables
, so you have to add the composer.exe folder path in Environment Variables.
Next step is to install Composer assets plugin
by executing the following command from command prompt:
composer global require "fxp/composer-asset-plugin:~1.1.1"
During installation of asset plugin, it will ask you for Github login credentials, because composer need to get API rate-limit to retrieve the dependent pacackges information from Github, you can find more information on this from Composer Documentation
Here we finished installing composer, and now we have to install Yii2. Move to a web-accessible folder, the folder where we usually place all web projects. In my XAMPP installation it is
D:\xampp\htdocs
Now go to command prompt, move to the above mentioned web-accessible folder, and execute following command:
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
It will install Yii2 framework to a folder named
basic
inside the htdocs
folder, you can use your own project name in place of basic(last part in the above command). Then composer will download and configure all the required packages, and finally your Yii2 basic application is now ready. You can try access it by localhost path:
http://localhost/basic/web
Install Manually
Manuall Installation of Yii involves three steps:- Download the archive file from yiiframework.com.
- Unpack the downloaded file to a Web-accessible folder, in our example it is D:\xampp\htdocs\basic
- Modify the
config/web.php
file by setting a secret key for thecookieValidationKey
configuration item (this is done automatically if you are installing Yii using Composer):'cookieValidationKey' => 'enter your secret key here',
Thats it, you can access this new basic application by following url:
http://localhost/basic/web
You should see the following "Congratulations!" page in your browser.
If you did not see this page, please check if your PHP installation satisfies Yii's requirements. Just copy /requirements.php
to /web/requirements.php
and then access it via http://localhost/requirements.php
. If you PHP development environment is properly configured, you should see the output similar to this:
You should configure your PHP installation so that it meets the minimum requirements of Yii. Most importantly, you should have PHP 5.4 or above.
My best Yii IDE is Codelobster
ReplyDeleteNice post. I was checking continuously this blog and I am impressed! Very helpful information specially the last part
ReplyDeleteHire Yii Framework Developers in India
I am very glad when I read this blog post
ReplyDeleteThanks for sharing valuable information.
Keep on posting...
cloud hosting in chennai
free static web hosting
smartermail login
web hosting services chennai
free domain transfer
sql server hosting
hosting mssql database
domain name reseller india
comodo ssl certificate india
I'm very Happy when I read this post
ReplyDeleteCheque based business Loan in Chennai
Cheque Based private Finance
Private Finance Companies In Chennai
Thanks for sharing your knowledge and thoughts on this topic.
ReplyDeletepremium villas in Hyderabad
luxury villas in hyderabad
Best villas in hyderabad
Villa Constructions in Hyderabad
Nice Blog!
ReplyDeleteThanks you very much for sharing valuable information.
Keep on posting...
Biofit ingredients
I am very glad when I read this blog post
ReplyDeleteThanks for sharing valuable information.
Keep on posting...
keravita pro ingredients list
biofit weight loss supplement
synogut pills
lean belly 3x side effects
ceracare official website
shallow sleep syndrome resurge
altai balance blood sugar support reviews
dentitox pro real reviews
Does java burn work
exipure amazon
உடனடி பணத்தேவையா
ReplyDeleteபழைய நகைகளுக்கு இன்றைய விலையில் பணம் பெற்றிடுங்கள்
தங்கம் வாங்குவோர்
I am very glad when I read this blog post
ReplyDeleteThanks for sharing valuable information.
Keep on posting...
Calf Sleeves Benefits
High Waist Tummy Control Panties
High Neck Tank Top
Compression Sleeve For Arm
Thanks for sharing this informative article about How to Install Yii2 framework on Windows with XAMPP with useful screenshots. PHP has many framework and one of them is YII. If you have any requirement to Hire Yii Developers for your project. Please visit us.
ReplyDeletethanks for sharing this blog
ReplyDeletemegaindequipments