Craft is a Content Management System (CMS) that is focused on doing one thing, content management. Different from WordPress, it doesn’t provide you with fancy widgets or themes – it is designed to be minimal and fast.

In this article, we will show you how easy it is to install and configure Craft CMS when you are using RunCloud to manage your servers.

Create An Empty Web App

Start by opening your RunCloud dashboard. Then, proceed to create a Web Application using RunCloud Panel, as shown in the picture below. 

Give it a descriptive name and scroll down.

Deploying new application on RunCloud dashboard

Configure your domain name, for quick and easy setup, we recommend integrating RunCloud with Cloudflare API, which automatically handles adding and removing DNS records.

New webapp on RunCloud dashboard

Craft CMS recommends using PHP 8.1 and later versions for a better experience. Don’t forget to append /web to your public path, as shown below. If you don’t modify your public path, you’ll need to delete the web application and start all over again.

Basic settings RunCloud dashboard

Open Project Directory

Log into your server via SSH and browse to the root directory of your web application. You can find the root path in the RunCloud dashboard.

Application Overview RunCloud PHP 8.2

Copy the root path and use the cd command to navigate to the root directory in the terminal. For the above example, the command would look like this

cd /home/runcloud/webapps/craft4

Once you have opened your web app, remove the empty index.html file from your project, you can run the following commands to delete the file and remove the empty folder.

rm ./web/index.html
rmdir web/

After running the above commands, go back to the RunCloud dashboard – don’t close the terminal yet!

Create A Database And User

Once you have deleted the file, we can proceed with the installation of Craft CMS, for that, we will need access to a database. Luckily, RunCloud makes it super easy to create new users and manage access.

Simply go to your RunCloud dashboard and pick the server that you are using. Locate the Databases tab on the left and open the “Database Users” submenu. 

Create a new database user and give it a secure password. Once you have created it, it should look something like this.

Create Database in RunCloud

After creating the database user, go back to the database tab and create a new database. Make sure to grant access to the user that we just created. After creating the database, it should look similar to the screenshot below.

Create a new Database on RunCloud

Installing The Craft CMS

After creating the database, we can begin the installation. 

Go back to the terminal and make sure that you are in the root directory of your project. You can run the pwd command to check your working directory, the output of this command should match the root path displayed in the RunCloud dashboard.

Once there, make sure that you are not running as a superuser, you can check the name of your current user by running the whoami command. The output of this command can be anything except “root”. For example, in the below example, we are running the system as “runcloud” user.

Craft CMS installation terminal

If you are running the shell as root user, you can imitate other users by running the following command. Just replace “runcloud” with the name of another user.

sudo su runcloud

Once you are sure that you are in the correct directory with correct permissions, run the following command to install the Craft CMS using PHP 8.2 and Composer.

/RunCloud/Packages/php82rc/bin/php /usr/sbin/composer create-project craftcms/craft .

After running the command, it will ask you if you want to begin the installation, type “yes” to start it. Leave the database driver, IP address, and database port filed empty and press enter to accept default values.

In the database username, password, and name field, enter the details that we just created in the previous step. After this, enter some random alphabets for database prefix.

CRAFTCMS on Linux RunCloud

Once you have entered the database details, you should be greeted with a message saying “Testing database credentials … success!”. After that you can configure the login credentials for the administrator account. Use a secure username and password. 

In the Site name, enter the name of the site that you want to display to users, for the site URL option, enter the complete URL of your web-application. If the URL is long and hard to memorize, you can just copy and paste the URL from the RunCloud dashboard. 

Installing CraftCMS on Ubuntu

Once you have completed the above steps, installation should automatically continue and deploy your site. Once it is completed, you can open the URL in a browser and should be greeted with a screen that looks like this.

CraftCMS home screen Welcome

Troubleshooting 

After installation is complete, log into your dashboard and navigate to Utilities> System report. Once there, scroll down to the bottom, you should see a green check mark next to each of the options.

In the following example, we have a warning mark next to some of the entries, we can click on “i” next to it to get more information. If that specific functionality is useful for you, then you can change this in the RunCloud dashboard.

health checks, System Overview CraftCMS

To change these settings, open the web app in the dashboard and navigate to the Settings tab. Once opened, scroll down to the PHP settings section and modify the settings accordingly.

If the text in the disabled functions field is too hard to read, you can press Ctrl + f in your browser to use the find function, which highlights the text on the page, as shown below. Once satisfied, don’t forget to click “Update PHP Settings” to save the changes.

PHP settings RunCloud dashboard

Now you can go back to the Craft CMS dashboard and refresh the page, all the warnings that you tackled should have disappeared.

CraftCMS system errors

After Action Report

Craft CMS is a popular content management system that focuses on security and performance over all other aspects of the application. 

It supports plugins and themes that can extend its functionality and improve user experience, but they are not available by default.

If you are looking for an easy and painless way to manage your servers, RunCloud is the perfect solution for you. With its intuitive dashboard and powerful features, RunCloud makes it easy to manage your servers and deploy applications. Start using RunCloud today and see how it can simplify your infrastructure.