How to Install Craft CMS on Cloudways

by Ahmed Khan  September 14, 2016

Until recently, the only choice for serious CMS projects was WordPress. There has been other content management systems and platforms, but none came close to the flexibility and performance of WordPress.

Craft is one of the recent platforms that pose themselves as WordPress alternates. While other fail to come up to the mark, Craft manages to outdo the competition by adopting a single-track focus on content management. By providing an excellent environment that cater to all areas of content management, Craft has managed to hold its own in the very competitive market of content management systems.

Install Craft CMS on Cloud

Powered by Yii, the well known (and respected) PHP framework, Craft CMS offers a scalable content management and presentation platform that is both robust and adaptable to all types of projects.

In this tutorial, I will discuss how you can install Craft on you Cloudways server. Let’s get the show on the road! If you don’t have an account on Cloudways yet, Sign Up now.

Step 1: Launch a New Server

Once you are Sign Up, launch a new server with PHP Stack application where we will install Craft CMS.

php server cloudways

Wait for Cloudways to finish launching the server. Next, select the Application and go to the Application Settings.

change application folder name

Edit application folder name to craftcms and click on Save.

saving folder name

Step 2: Download Craft CMS

Now go to your server and launch SSH Terminal. Log in with your credentials.

launch ssh terminal

Once logged in, go to the application directory through this command

Download Craft

downloading craft cms via ssh

Now unzip it by running following command.

Once unzipped, remove the zip file by running following command.

Now that Craft has been successfully downloaded, the next step is to install it

Step 3: Install Craft CMS on Cloud

In order to install Craft, the first step is adding database information in config file. For that, run the following command in the terminal to open the db config file.

craftcms config

Once the file opens, press i to start editing the file. Go to the Craft Application panel on Cloudways console, copy the database credentials from the Access details and fill it in the open file.

database details cloudways

Once you have filled all the information, press ESC, type wq and press Enter in order to save all the changes. Now head to the staging URL and add the following line

updating craftcms config file

public/index.php/admin/install at the end of URL to open Craft installer. If you see the monkey page (see below), everything has been configured successfully.

craft installation

Now let’s begin the installation by clicking the Begin button. On the next page, create the admin account and click on Next.

creating admin account craftcms

In the next screen, give the site a name, setup the site URL and click on Finish Up.

finishing craftcms installation

Craft will now start the installation.

complete installation craft

Once the process finishes, go to the Craft CMS application staging URL.

craft default page

If you see the above message, Craft has been successfully installed on your Cloudways server.

I hope that you have no issues in installing Craft CMS on your Cloudways server. If you have a question or wish to add to the conversation, please leave a comment.

Create PHP websites without the worry of server management.

Deploy your PHP app on optimized PHP hosting servers.

About 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 ahmed.khan@cloudways.com

Stay Connected:

You Might Also Like...

  • Is there any way to install Craft using the recommended method of installing the actual craft directory outside of the public folder?

    • HI Nat,

      There are two solution for it; one with Cloudways and the other when you are not running your website on Cloudways:

      1. If you are on Cloudways go to your Application Setting and from there edit your Webroo and add /public in it. Now access your application using SSH Terminal or FileZila and head to public folder of Craft. Inside the folder, rename the htaccess file to .htaccess. Now when you will access your site you will not require adding /public every time. Moreover, you can access your admin without adding /index.php/admin/.

      2. If you are not on Cloudways you need to create .htaccess file outside the public folder and need to paste the following code in it.

      `
      RewriteEngine On
      RewriteCond %{REQUEST_URI} !^/public/
      RewriteRule ^(.*)$ /public/$1 [L,R=301]

      Once you are done pasting the code, Go to the public folder of craft and rename it’s htaccess file name to .htaccess

  • It looks like my first comment got removed. Just in case that isn’t what happened, I’ll try asking one more time.

    Is there a way on Cloudways to install Craft in the suggested way i.e. the Craft directory itself is a directory above the public folder for security?

  • Splendor

    I’m having problems with the connection of the db even when adding the different credentials manually through ftp. It fails to find the db. Can you please help Ahmed Khan?

    • Hi Splendor,

      Have you followed the Step 3 correctly?

      • Splendor

        Yes, I wonder, what is the link to login to craft cms? instead of wp-admin