<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yii Archives - The Code Developer</title>
	<atom:link href="https://www.thecodedeveloper.com/category/yii/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.thecodedeveloper.com/category/yii/</link>
	<description>The Code Developer is a Programming Blog.</description>
	<lastBuildDate>Wed, 30 Oct 2019 09:02:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>How To Install Yii With XAMPP On Windows Using Composer</title>
		<link>https://www.thecodedeveloper.com/install-yii-with-xampp/</link>
					<comments>https://www.thecodedeveloper.com/install-yii-with-xampp/#comments</comments>
		
		<dc:creator><![CDATA[Vikas Kumar]]></dc:creator>
		<pubDate>Wed, 06 Feb 2019 17:34:48 +0000</pubDate>
				<category><![CDATA[Composer]]></category>
		<category><![CDATA[Yii]]></category>
		<guid isPermaLink="false">https://www.thecodedeveloper.com/?p=2811</guid>

					<description><![CDATA[<div style="margin-bottom:20px;"><img width="1000" height="262" src="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/yii-with-xampp-on-windows-using.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Install Yii With XAMPP On Windows Using Composer" decoding="async" fetchpriority="high" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/yii-with-xampp-on-windows-using.png 1000w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/yii-with-xampp-on-windows-using-442x116.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/yii-with-xampp-on-windows-using-768x201.png 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></div>
<p>In this tutorial we will show you how to Install Yii With XAMPP On Windows Using Composer step by step. Yii uses Composer, a dependency management tool, as the officially supported method for installation. Through Composer it&#8217;s simple and easy to installing latest Yii 2.0 version by running a single command. To Install Yii With XAMPP On Windows Using Composer, [&#8230;]</p>
<p>The post <a href="https://www.thecodedeveloper.com/install-yii-with-xampp/">How To Install Yii With XAMPP On Windows Using Composer</a> appeared first on <a href="https://www.thecodedeveloper.com">The Code Developer</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div style="margin-bottom:20px;"><img width="1000" height="262" src="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/yii-with-xampp-on-windows-using.png" class="attachment-post-thumbnail size-post-thumbnail wp-post-image" alt="Install Yii With XAMPP On Windows Using Composer" decoding="async" loading="lazy" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/yii-with-xampp-on-windows-using.png 1000w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/yii-with-xampp-on-windows-using-442x116.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/yii-with-xampp-on-windows-using-768x201.png 768w" sizes="auto, (max-width: 1000px) 100vw, 1000px" /></div><p>In this tutorial we will show you <strong>how to Install Yii With XAMPP On Windows Using Composer</strong> step by step. Yii uses Composer, a dependency management tool, as the officially supported method for installation. Through Composer it&#8217;s simple and easy to <strong>installing latest Yii 2.0 version </strong>by running a single command.</p>
<p>To <strong>Install Yii</strong> With XAMPP On Windows Using Composer, follow the below given steps:</p>
<ol>
<li><a href="#what-is-yii">What Is Yii?</a></li>
<li><a href="#server-requirements">Server Requirements</a></li>
<li><a href="#install-xampp">Install XAMPP</a></li>
<li><a href="#install-composer">Install Composer</a></li>
<li><a href="#install-yii">Installing Yii</a></li>
<li><a href="#configuring-the-host">Configuring the Host File in Windows</a></li>
</ol>
<p>Let’s get started:</p>
<h2 id="what-is-yii">#1. <strong>What Is Yii?</strong></h2>
<p>Yii is an incredibly reliable, well-designed, high-performing framework for PHP, similar to CakePHP or Laravel.</p>
<p>Currently, there are two Yii 2.0 application templates available:</p>
<ul>
<li>Basic Application Template – a basic frontend application template.</li>
<li>Advanced Application Template – consisting of a frontend, a backend, console resources, common (shared code), and support for environments.</li>
</ul>
<p>In this article we will describe how to <strong>install Yii with the Basic Project Template</strong>.</p>
<div class="bs-shortcode-alert alert alert-info">
<p>The Basic Project Template is fit for developing 90 percent of Web applications. If you are a beginner to Yii, we highly recommended use to the Basic Project Template.</p>
</div>
<h2 id="server-requirements">#2. Server Requirements</h2>
<p>Before Install Yii using Composer make sure following requirements are enabled and installed on your machine:</p>
<p>1) The minimum PHP version required should be 5.4 or greater. For it we will install XAMPP on Windows.</p>
<h2 id="install-xampp">#3. Install XAMPP</h2>
<p>First thing you need to do is <a href="https://www.apachefriends.org/index.html" target="_blank" rel="noopener noreferrer">download the latest version of XAMPP</a> that supports PHP 7.3.1 and Install it on Windows. For more details, see our step by step guide on <a href="https://www.thecodedeveloper.com/how-to-install-xampp-on-windows/" target="_blank" rel="noopener noreferrer">How To Download And Install XAMPP On Windows</a>.</p>
<h2 id="install-composer">#4. Install Composer</h2>
<p>The next thing you need to do Install Composer On Windows With XAMPP. This process will take another 5-10 minutes. For more details, see our step by step guide on:</p>
<p><a href="https://www.thecodedeveloper.com/install-composer-windows-xampp/" target="_blank" rel="noopener noreferrer">How to Install Composer On Windows With XAMPP</a></p>
<p>To check the composer installation, Type the following command in command prompt:</p>
<pre class="brush: plain; title: ; notranslate">composer</pre>
<p><a href="https://www.thecodedeveloper.com/install-laravel-with-xampp-using-composer/write-composer-for-execute-the-command/" rel="attachment wp-att-4038"><img decoding="async" class="aligncenter size-full wp-image-4038" src="https://www.thecodedeveloper.com/wp-content/uploads/2019/01/write-composer-for-execute-the-command.png" alt="write composer for execute the command" width="996" height="524" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2019/01/write-composer-for-execute-the-command.png 996w, https://www.thecodedeveloper.com/wp-content/uploads/2019/01/write-composer-for-execute-the-command-442x233.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2019/01/write-composer-for-execute-the-command-768x404.png 768w" sizes="(max-width: 996px) 100vw, 996px" /></a></p>
<h2 id="install-yii">#5. Installing Yii2.0 Basic Application Template via composer</h2>
<p>To install Yii, First of all, you have to go <code>C:/xampp/htdocs</code> directory, to navigate it type following command in your command prompt:</p>
<pre class="brush: plain; title: ; notranslate"> cd c:/xampp/htdocs </pre>
<p><a href="https://www.thecodedeveloper.com/install-laravel-with-xampp-using-composer/navigate-to-htdocs-folder/" rel="attachment wp-att-4046"><img decoding="async" class="aligncenter size-full wp-image-4046" src="https://www.thecodedeveloper.com/wp-content/uploads/2019/01/navigate-to-htdocs-folder.png" alt="navigate to htdocs folder" width="995" height="199" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2019/01/navigate-to-htdocs-folder.png 995w, https://www.thecodedeveloper.com/wp-content/uploads/2019/01/navigate-to-htdocs-folder-442x88.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2019/01/navigate-to-htdocs-folder-768x154.png 768w" sizes="(max-width: 995px) 100vw, 995px" /></a></p>
<p>Now we are ready to install Yii, run the following command to install latest Yii version:</p>
<pre class="brush: plain; title: ; notranslate">

composer create-project --prefer-dist yiisoft/yii2-app-basic yiiproject

</pre>
<p><span style="text-transform: initial;">After running this command it should start downloading dependencies that are required to create the Yii project.</span><a href="https://www.thecodedeveloper.com/install-yii-with-xampp/installing-yii2-0-using-composer/" rel="attachment wp-att-4215"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4215" src="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Installing-Yii2.0-using-composer.png" alt="Installing-Yii2.0-using-composer" width="998" height="523" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Installing-Yii2.0-using-composer.png 998w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Installing-Yii2.0-using-composer-442x232.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Installing-Yii2.0-using-composer-768x402.png 768w" sizes="auto, (max-width: 998px) 100vw, 998px" /></a></p>
<p>This installation may take a few minutes after executing the above command, so wait until you get success message like in the below image.</p>
<p><a href="https://www.thecodedeveloper.com/install-yii-with-xampp/installed-yii2-0-using-composer/" rel="attachment wp-att-4217"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4217" src="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Installed-Yii2.0-using-composer.png" alt="" width="998" height="419" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Installed-Yii2.0-using-composer.png 998w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Installed-Yii2.0-using-composer-442x186.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Installed-Yii2.0-using-composer-768x322.png 768w" sizes="auto, (max-width: 998px) 100vw, 998px" /></a></p>
<p>It installed Yii2 framework to a folder named <strong>yiiproject</strong> inside the <code>C:/xampp/htdocs</code>directory, you can use your own directory name in place of <strong>yiiproject</strong> (last part in the above command).</p>
<p>When it completed, it will create following directory schema:</p>
<p><a href="https://www.thecodedeveloper.com/install-yii-with-xampp/yii-directory-structure/" rel="attachment wp-att-4221"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4221" src="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Yii-Directory-Structure.png" alt="Yii Directory Structure" width="1057" height="528" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Yii-Directory-Structure.png 1057w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Yii-Directory-Structure-442x221.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Yii-Directory-Structure-768x384.png 768w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/Yii-Directory-Structure-1024x512.png 1024w" sizes="auto, (max-width: 1057px) 100vw, 1057px" /></a></p>
<p>Now everything is ready, start the Apache server using the XAMPP control panel.</p>
<p><a href="https://www.thecodedeveloper.com/install-yii-with-xampp/restart-xampp-control-panel/" rel="attachment wp-att-4228"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4228" src="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/restart-xampp-control-panel.png" alt="restart xampp control panel" width="974" height="490" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/restart-xampp-control-panel.png 974w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/restart-xampp-control-panel-442x222.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/restart-xampp-control-panel-768x386.png 768w" sizes="auto, (max-width: 974px) 100vw, 974px" /></a></p>
<p>Finally your Yii2 basic application is now ready, type this URL <code>http://localhost/yiiproject/web/</code> in your browser and press enter.</p>
<p><a href="https://www.thecodedeveloper.com/install-yii-with-xampp/you-have-successfully-created-your-yii-powered-application/" rel="attachment wp-att-4223"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4223" src="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/You-have-successfully-created-your-Yii-powered-application.png" alt="You have successfully created your Yii-powered application" width="1295" height="541" srcset="https://www.thecodedeveloper.com/wp-content/uploads/2019/02/You-have-successfully-created-your-Yii-powered-application.png 1295w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/You-have-successfully-created-your-Yii-powered-application-442x185.png 442w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/You-have-successfully-created-your-Yii-powered-application-768x321.png 768w, https://www.thecodedeveloper.com/wp-content/uploads/2019/02/You-have-successfully-created-your-Yii-powered-application-1024x428.png 1024w" sizes="auto, (max-width: 1295px) 100vw, 1295px" /></a></p>
<h2 id="configuring-the-host">#6. Configuring the Host File in Windows</h2>
<p>If you want to customize the local browser addresses for your site. To do this, we need to configure a Virtual Host in XAMPP for a Yii project and in this example we want to configure the domain <strong>localhost.yiiproject.com</strong> for our project. To do so, edit <strong>httpd-vhosts.conf</strong> file which is located within <code>C:\xampp\apache\conf\extra\httpd-vhosts.conf</code></p>
<p>Add following code snippet at the end of your file:</p>
<pre class="brush: plain; title: ; notranslate"> 

# VirtualHost for localhost.yiiproject.com
 
&lt;VirtualHost *:80&gt;
    DocumentRoot &quot;C:/xampp/htdocs/yiiproject/web&quot;
    ServerName localhost.yiiproject.com  
    &lt;Directory &quot;C:/xampp/htdocs/yiiproject/&quot;&gt;
      Options Indexes MultiViews FollowSymLinks
      AllowOverride All
      Require all granted
    &lt;/Directory&gt;
&lt;/VirtualHost&gt;

</pre>
<p>After this, apache server is listening to <strong>localhost.yiiproject.com</strong> connections, but we have to configure our hosts file that allows to redirect <strong>localhost.yiiproject.com</strong> to the localhost , to do so, edit the <strong>hosts</strong> file which is located within <code>C:\Windows\System32\drivers\etc</code></p>
<p>Add following code snippet at the end of your file:</p>
<pre class="brush: plain; title: ; notranslate"> 
127.0.0.1 localhost
127.0.0.1 127.0.0.1
127.0.0.1 localhost.yiiproject.com
</pre>
<p>After set up Virtual Host in XAMPP, restart the Apache server using the XAMPP control panel, then you can use this URL <strong>localhost.yiiproject.com </strong>in your browser.</p>
<h4>Final Words</h4>
<p>That’s it! I hope this article helped you learn to How To Install Yii With XAMPP On Windows Using Composer.</p>
<p><strong><em>Please feel free to comment below, your suggestion and problems if you face – we are here to solve your problems.</em></strong></p>
<p>The post <a href="https://www.thecodedeveloper.com/install-yii-with-xampp/">How To Install Yii With XAMPP On Windows Using Composer</a> appeared first on <a href="https://www.thecodedeveloper.com">The Code Developer</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.thecodedeveloper.com/install-yii-with-xampp/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
