Table Of Contents
What is CraftCMS
Craft is a Content Management System (CMS) that is really focused on doing one thing, content management. Different from WordPress, CraftCMS doesn’t give you a fancy widget or even a theme. They said that, “Craft is for folks who like to take their time and do things right, building out their HTML, CSS, and JS by hand”. Which means you need to craft everything yourself.
Craft is built using Yii Framework and it is really fast compared to WordPress. Like really really fast.
Craft have three tier pricing level as you can see from image below.
How to Install Craft
We didn’t add Craft as Script Installer inside RunCloud because you need to agree with their term and condition before downloading their file. Thus, download the file yourself into your computer.
Create Web Application
Now create the Web Application using RunCloud Panel as shown in the picture below. Make sure you append /public to the Public Path of the Web Application.
Click the advance setting checkbox and remove curl_multi_exec from disable_functions. curl_multi_exec is used to check the Craft License and if you didn’t remove it from here, you won’t be able to buy the Craft license.
Now save the Web Application and we will continue to the next stage.
Uploading and Extract
You can see from the image above, I am using ahmadfikrizaman for the Web Application user. Please make sure you use this user to upload or modify anything related to the web application.
Now you can upload the zip file that you have downloaded using SCP or SFTP. I like SCP very much, so we will use SCP for this.
scp Craft-2.6.2968.zip ahmadfikrizaman@<ip address>:~/webapps/craft/
After the upload process completed, login into your server using the same user to extract the file (there is no extract function inside RunCloud File Manager when this article was published).
ssh ahmadfikrizaman@<ip address> cd ~/webapps/craft unzip Craft-2.6.2968.zip
Fixing The Permission and rename htaccess
After you have extract the zip file, you will find these files inside your Web Application.
If you read the Craft Docs about installing the Craft, it says you shouldn’t upload the public folder because it represent the web root. In this case, if you are using cPanel then yes you should only upload index.php and htaccess file. But we are using RunCloud where you can modify the public_path yourself, you should omit the message.
Inside the RunCloud File Manager, double click the public folder, select htaccess and click rename button. Rename it to .htaccess.
After you have rename the htaccess to .htaccess, double click the ../ to go back to parent directory and double click the craft folder to enter the directory. Now select app, config, and storage folders and click Change Permission button.
Set the permission to 744 as shown in the image below.
Create Database and Edit db.php
Now create database and also the database user to use with Craft. I am using craft for both database name and user.
In the file manager, double click the config folder and select db.php. After that, click View/Edit button to edit the db.php file. This will open a new window for you to edit this file.
Please make sure you are using 127.0.0.1 instead of localhost since RunCloud provisioned your server to listen to tcp instead of using socket.
Now click CMD + S to save the edited file on MacOS or CTRL + S if you are on Linux or Windows.
After that, open up your domain or server ip address (if you set this web application as default) and point it to /admin. For this example, I am using craftcms.fikri.my as the domain name and I should open the http://craftcms.fikri.my/admin inside my browser. Then you will be greet with beautiful Craft Installation as shown below.
The installation is real straight forward and easy to understand. You might need to install SSL before starting the installation. And after the installation ended, you also might need to setup the email notification and we suggest that you use Mailgun for this because we have explained it inside our Email Post.
Thats all, enjoy crafting your own CMS!
Since Craft was built to craft it yourself CMS, it is better to use GIT workflow rather than installing it using downloadable zip file. You can read the CraftCMS StackExchange on how to use GIT Workflow with Craft.