Chat with us, powered by LiveChat

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How to Host Yii 2 Framework on Cloudways Using Composer

June 6, 2017

4 Min Read
Reading Time: 4 minutes

A lot of readers came in and asked the procedure for hosting Yii2 on Cloudways platform. Hence, I am sharing the step by step guide on how you can use the composer to host Yii2 framework on the Cloudways platform.

What is Yii2?

Yii2 is the latest version of Yii framework and is basically a rewrite of Yii on top of PHP 5.4.0. It is aimed to become a hot favorite of the new generation of PHP frameworks. Now let’s get started:

For installing Yii2 on Cloudways web hosting for PHP, you need to have a Cloudways account. It’s easy to sign up and takes up only a few minutes of your time. Cloudways is a hosting paradise for agencies, bloggers, website owners and for those who are looking for reliable and speedier load times on their websites.

Before you get started, signup or login to Cloudways platform.

Let’s get started:

Host Your PHP Apps with Us for 10x Faster Performance

Don’t Let Your Customers Run Away With The Downtimes. Deploy With Us Today!

Step 1: Launch Your Server

Login to your Cloudways account and click on Launch server.

Step 2: Select your Application

Now that you are on Launch Server page, select your application as PHP Stack. Fill in your application name, Server name and project name.

Step 3: Choose your desired Cloud provider and Server Size

Now choose your cloud provider. Cloudways offers cloud servers from Google, Amazon, Digital Ocean, Vultr and others.

Step 4: Select your Data Center

Now select your data center which is closest to your location.

Step 5: Launch Server

Now click on launch button and your server will be ready within 8 minutes. Once your server is created you will be able to see the following page.


Step 6: Launch SSH Terminal

Now go to Server Management tab and click on Launch SSH terminal.

Login in your terminal with the username and password provided in Master Credentials.

Step 7: Install Yii2 on Hosting

To install Yii2, type the following commands in order to go to our newly created PHP Stack Yii2 folder.

cd applications
cd yii2

Give Your PHP Applications Optimum Web Performance

Host Your PHP Apps With Us & See The Blazing Web Performance Yourself!

Since now we are in our application folder, we have to go to public_html where we will install Yii2

cd public_html

Now, type the following command and press enter to start Yii2 installation.

composer global require "fxp/composer-asset-plugin:^1.3.1"
composer create-project --prefer-dist yiisoft/yii2-app-basic basic

Yii2 installation will be started and you will see this screen while the installation process is going.

Install Yii2

Once the installation is complete, go to your application tab on Cloudways and select your Yii2 application and copy the application URL link. Paste the application URL on your browser and at the end of URL type /basic/web/ and hit enter. You will see the congratulation page of Yii as:

Yii2 on Cloud

Related: Create A Cross-Platform REST API In Yii2

If you see this page, you have successfully hosted Yii2 on Cloudways. If you are unable to see the Congratulations! page, you might have done something wrong during the process. Not to worry, you can contact me with your error and I will try my best to resolve your problem. Feel free to comment below the blog and ask your query.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Launch PHP websites without the worry of Server Management.

Pre-Installed Optimized Stack with Git, Composer & SSH

Ahmed Khan

Ahmed was a PHP community expert at Cloudways - A Managed PHP Hosting Cloud Platform. He is a software engineer with extensive knowledge in PHP and SEO. He loves watching Game of Thrones is his free time. Follow Ahmed on Twitter to stay updated with his works. You can email him at

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

BFCM 2019