<?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 php framework Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/yii-php-framework/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Tue, 19 May 2020 19:54:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to install Yii PHP framework on Ubuntu 20.04?</title>
		<link>https://www.osradar.com/how-to-install-yii-php-framework-ubuntu-20-04/</link>
					<comments>https://www.osradar.com/how-to-install-yii-php-framework-ubuntu-20-04/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Tue, 19 May 2020 22:54:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[focal]]></category>
		<category><![CDATA[Focal Fossa]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[Yii]]></category>
		<category><![CDATA[yii php framework]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=20414</guid>

					<description><![CDATA[<p>Web programming has a very important place nowadays. And within the web technologies, the PHP language is one of the most popular. That&#8217;s why several frameworks bring together the development process. Today, I&#8217;ll show you how to install Yii PHP framework on Ubuntu 20.04 In order to be pragmatic and flexible, Yii PHP was born. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-yii-php-framework-ubuntu-20-04/">How to install Yii PHP framework on Ubuntu 20.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Web programming has a very important place nowadays. And within the web technologies, the PHP language is one of the most popular. That&#8217;s why several frameworks bring together the development process. Today, I&#8217;ll show you <strong>how to install Yii PHP framework on Ubuntu 20.04</strong></p>



<p>In order to be pragmatic and flexible, <a href="https://www.yiiframework.com/">Yii PHP</a> was born. It is a framework for object-oriented PHP development that uses the architectural pattern MVC. What makes it ideal for developing many web applications such as forums, information sites or virtual shopping.</p>



<p>With Yii PHP you will have no licensing problems because it is open source (<a href="http://www.linfo.org/bsdlicense.html">BSD Licence</a>) which makes it ideal for community, educational or long-range projects.</p>



<p>Yii is not so different from frameworks like Laravel or CakePHP but it provides another way of doing things. Let&#8217;s say similar but not the same.</p>



<p><a href="https://www.osradar.com/install-laravel-ubuntu-2004/" target="_blank" rel="noreferrer noopener">How to install Laravel on Ubuntu 20.04?</a></p>



<p><a href="https://www.osradar.com/how-to-install-cakephp-on-ubuntu-20-04/" target="_blank" rel="noreferrer noopener">How to install CakePHP on Ubuntu 20.04?</a></p>



<p>So, let us start.</p>



<h2>Install Yii PHP Framework on Ubuntu 20.04</h2>



<p>As it is a PHP framework, it is required that you have PHP installed on your computer. It also installs some PHP modules, as well as the unzip package.</p>



<pre class="wp-block-preformatted">:~$ sudo apt install php php-pdo php-intl php-xml php-zip php-mbstring phpunit php-mysql php-sqlite3 unzip</pre>



<h3>1.- Install Composer on Ubuntu 20.04</h3>



<p>The installation method recommended by the Yii development team is to use composite.</p>



<p>As we have explained, Composer is a PHP dependency manager that can be installed on Linux, very easily.</p>



<p><a href="https://www.osradar.com/install-php-composer-ubuntu-20-04/" target="_blank" rel="noreferrer noopener">How to install PHP Composer on Ubuntu 20.04?</a></p>



<p>Also, you can get more information about Composer with this post:</p>



<p><a href="https://www.osradar.com/using-composer-on-linux/" target="_blank" rel="noreferrer noopener">Using Composer on Linux</a></p>



<p>When Composer is installed and well configured, we can start the installation.</p>



<h3>2.- Installing Yii PHP framework on Ubuntu 20.04</h3>



<p>With Composer already installed, you can start the installation of Yii with the following command:</p>



<pre class="wp-block-preformatted">:~$ composer create-project --prefer-dist yiisoft/yii2-app-basic project</pre>



<p>You have to replace <strong>project</strong> with the name of your desired project.</p>



<p>Then the installation will start and when it is finished, you will see this screen.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="380" src="https://www.osradar.com/wp-content/uploads/2020/05/1-13-1024x380.png" alt="1.- Install Yii PHP framework on Ubuntu 20.04" class="wp-image-20417" srcset="https://www.osradar.com/wp-content/uploads/2020/05/1-13-1024x380.png 1024w, https://www.osradar.com/wp-content/uploads/2020/05/1-13-300x111.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/1-13-768x285.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/1-13-696x259.png 696w, https://www.osradar.com/wp-content/uploads/2020/05/1-13-1068x397.png 1068w, https://www.osradar.com/wp-content/uploads/2020/05/1-13.png 1214w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>1.- Install Yii PHP framework on Ubuntu 20.04</figcaption></figure>



<p>Optionally you can make npm handle Javascript dependencies and not Composer. If you want to do it, edit the file <code>composer.json</code></p>



<p>And in the end, add the following:</p>



<pre class="wp-block-preformatted">"replace": {<br>"bower-asset/jquery": "&gt;=1.11.0",<br>"bower-asset/inputmask": "&gt;=3.2.0",<br>"bower-asset/punycode": "&gt;=1.3.0",<br>"bower-asset/yii2-pjax": "&gt;=2.0.0"<br>},</pre>



<p>So, save the changes and close the file.</p>



<p>The next step is to <strong>serve</strong> the project, to prove that all is well. If you did the installation on a local computer, execute this command:</p>



<pre class="wp-block-preformatted">:~$ php yii serve
Server started on http://localhost:8080/
Document root is "/home/angelo/project/web"
Quit the server with CTRL-C or COMMAND-C.
[Mon May 18 22:39:44 2020] PHP 7.4.3 Development Server (http://localhost:8080) started</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="834" height="173" src="https://www.osradar.com/wp-content/uploads/2020/05/2-16.png" alt="2.- Serve projects on Yii" class="wp-image-20418" srcset="https://www.osradar.com/wp-content/uploads/2020/05/2-16.png 834w, https://www.osradar.com/wp-content/uploads/2020/05/2-16-300x62.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/2-16-768x159.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/2-16-696x144.png 696w" sizes="(max-width: 834px) 100vw, 834px" /><figcaption>2.- Serve projects on Yii</figcaption></figure>



<p>And this will make the project available from <code>http://localhost:8080</code></p>



<p>You can also specify a host and a port:</p>



<pre class="wp-block-preformatted">:~$ php yii serve 192.168.250.20 --port=1234</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="825" height="176" src="https://www.osradar.com/wp-content/uploads/2020/05/3-14.png" alt="3.- Serve the project on a different host and port" class="wp-image-20419" srcset="https://www.osradar.com/wp-content/uploads/2020/05/3-14.png 825w, https://www.osradar.com/wp-content/uploads/2020/05/3-14-300x64.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/3-14-768x164.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/3-14-696x148.png 696w" sizes="(max-width: 825px) 100vw, 825px" /><figcaption>3.- Serve the project on a different host and port</figcaption></figure>



<p>Finally, open your favorite web browser and go to <code>http://host:port</code> and you will see the following:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="506" src="https://www.osradar.com/wp-content/uploads/2020/05/4-12-1024x506.png" alt="4.- Yii PHP framework on Ubuntu 20.04" class="wp-image-20420" srcset="https://www.osradar.com/wp-content/uploads/2020/05/4-12-1024x506.png 1024w, https://www.osradar.com/wp-content/uploads/2020/05/4-12-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2020/05/4-12-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2020/05/4-12-696x344.png 696w, https://www.osradar.com/wp-content/uploads/2020/05/4-12-1068x528.png 1068w, https://www.osradar.com/wp-content/uploads/2020/05/4-12.png 1354w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>4.- Yii PHP framework on Ubuntu 20.04</figcaption></figure>



<p>So, Yii is ready to start developing web applications.</p>



<h2>Conclusion</h2>



<p>Yii is a less popular framework than CakePHP or Laravel, but equally powerful. Many websites are made with this framework and the results are fantastic for the developer and the end-user.</p>



<p>On the other hand, the installation of Yii is facilitated thanks to its compatibility with Composer.</p>



<p>So, share this post, join <a href="https://t.me/osradar" target="_blank" rel="noreferrer noopener">our Telegram Channel</a> and buy us a coffee 🙂</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-yii-php-framework-ubuntu-20-04/">How to install Yii PHP framework on Ubuntu 20.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/how-to-install-yii-php-framework-ubuntu-20-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
