Installing Craft CMS

Updated on Jan 23, 2025

Welcome to our Craft CMS tutorial section, where we will show you how to create a simple blogging website from scratch! As this whole tutorial is primarily for beginners, the website itself will be simple but focus on the fundamentals of working with Craft CMS. All techniques and steps we will show you will be applicable when creating more complex websites, of course, and can still serve as a foundation upon which to build.

Without further ado, let us begin with the basics.

The first thing we need to do is set up Craft CMS itself. As this is a beginner's tutorial for our hosting services, we will use the Composer version of the installation. It is quicker and more straightforward. You can check Craft's requirements in a previous section of our tutorial. All our services cover them already. With that said, the first thing we will do is create a database. You can check our database guide or follow along here.

This post includes:

section

Database

To begin, log into your cPanel and go to Database Wizard.

Then, put in the name of your database and click Next Step.

In the next step, give the user a name and a password. The password generator can create a strong one for you. For simplicity's sake, we will give the user the same name as the database itself. When ready, click Create User.

Finally, tick All Privileges and then click Next Step.

With that, your database, user, and password are done. Remember to note down the name/user and password! Now, it is time to install Craft itself.

section

Installation

As we mentioned before, we will be using Composer to install Craft. The process is very straightforward, and the installer itself will guide you through it. To begin, go to the Terminal in your cPanel or log via SSH to your cPanel account.

Once you are in the terminal, all you need to do is run the Composer command. We are using this one for our tutorial.

composer create-project craftcms/craft fastcomet-craftcms

However, you can replace "fastcomet-craftcms" with anything you wish, as that will be your project's name and directory. We recommend you do that in the public_html directory (or any other that already has a domain pointed to it) so that you can easily access your website online. Then, the command will download Craft CMS to the directory and then prompt you to install it.

Type in "yes." Afterwards, follow the prompts. Here is what it will ask you.

  • Database Driver - Which database driver are you using? In our case, it is MySQL, so type in mysql;
  • Database Server - Type in the IP address of the database server. Since it is our service, you can simply hit Enter, which will leave the default value of the server's local IP address. That is sufficient;
  • Database Port - Hit Enter again, and the installer will accept the default port for MySQL: 3306. That is the correct port for our services;
  • Database Username, Password, and Name - Input the username, password, and name for your database in the order you are asked;
  • Table Prefix - Skip this one by hitting Enter, as no table prefix is necessary;
  • Install Craft Now? - Simply type in "yes" to continue;
  • Username - This is the admin username. You can type in your own or hit Enter to use the default admin;
  • Email - The administrative email address. You must specify one, as it is how you log into the dashboard;
  • Password and Confirm Password - The administrative password. You have to type it in twice;
  • Site Name, Site URL, and Site Language - Simply fill in the name of your website and its URL. As you will see in the image below, we put in a proper domain name plus the /web subdirectory since that is where the publicly accessible part of the website lives. You can press Enter to select the default [en-US] language or type in your own.

This is how the setup looks in the terminal.

Once the installer is done, you will receive the appropriate green message. At this point, you should move the files from the directory the installer created one level up so they are in the directory for your domain.

To do that:

  • Go to File Manager in cPanel, public_htm, and then the directory for Craft;
  • Click Select All (which will select all files and directories but ensure the option to see hidden files is enabled), and then Move;
  • Delete the directory you are currently in, leave only public_html, and then Move Files.

With that done, you can go to your website and add /web at the end and see the Craft CMS default page.

And there you have it! Craft CMS is installed and working. Go to the control panel and log in. You will find the dashboard. As you can see, the installation is straightforward. The challenging part comes when building the website itself. With that said, let us dive right into it.

On this page...