Skip to main content

Main navigation

  • Tips & Tutorials
  • About the Options
    • Building with Drupal Canvas and Jarvis
    • Request the StarterSite
    • Spin Up A Blank Drupal Site
    • Case Studies
    • Demo
  • Support
    • I'm Rod Martin
    • Contact Us
  • Training
    • Drupal in a Day Training
    • Drupal Site Building Advanced Training
    • Drupal Immersion Training
    • Custom Content Editor Training
    • Drupal AI Training
  • YouTube
    • Introduction to Drupal AI
  • Search
Home

Creating a Drupal Site at a Webhost with CPanel

install drupal at a webhost
Filed Under
Site Building
Publication Date
Sunday, February 23rd, 2025

There are many ways to host Drupal websites. 

Install Drupal at a webhost that uses CPanel and public_html as the root of the website.

Step 1: Log in to cPanel

  1. Open your web browser and go to yourwebsite.com/cpanel.
  2. Enter your cPanel username and password (provided by your web host).
  3. Click Log in.

Step 2: Create a MySQL Database

Drupal requires a database to store its content and settings.

  1. In cPanel, go to Databases > MySQL Databases.
  2. Under Create a New Database, enter a database name (e.g., drupal_db) and click Create Database.
  3. Scroll down to MySQL Users and create a user:
    1. Enter a username (e.g., drupal_user).
    2. Enter a strong password.
    3. Click Create User.
  4. Assign the user to the database:
    1. Under Add User to Database, select the user and database.
    2. Click Add and select All Privileges.
    3. Click Make Changes.

Step 3: Install Drupal

We'll do most of this in the terminal.

  1. Scroll down and find the Terminal button.  Open a new terminal window.
  2. Type ls and press enter.  Make sure you are in the root and can see the public_html folder listed.
  3. Enter the following commands:

composer create-project drupal/recommended-project:10.4.3 public_html --no-interaction --no-install (update the version of Drupal to the version you want).

cd public_html

mv composer.json ../

rm composer.lock

cd ..

  1. You'll need to edit the composer.json file.  Click on the CPanel logo and go to the File Manager.  Click on composer.json and edit the file.  You'll need to change web/ to public_html/ (see the file attached).  Save and head back to the terminal.
  2. Enter: composer install
  3. Head over to the URL of your site and complete the set up like any Drupal site.  You'll need the database credentials you created earlier.

    You're done!

If you're moving a site from Gitpod.io to a webserver like the one above, watch this video: https://www.youtube.com/watch?v=uTsnFxLltfA 

Document
composer.json_.txt (3.5 KB)

Latest Tips

  • 20 Client Sites, No Git, and Drupal 10 Ends December 9
  • Drupal 10 Ends December 9: The Freelancer's Client Upgrade Checklist
  • Speaking at Drupal Camp Chattanooga
  • How Long Does It Take to Move a Layout Builder Site to Drupal Canvas? I Timed My Own.
  • Your AI API Keys Belong in the Key Module: Drupal AI Setup in 60 Seconds
  • Three AI Projects That Actually Paid for Themselves
  • Build a Single Directory Component From Scratch, Then Drop It Into Drupal Canvas (Full Walkthrough)
  • Drupal AI Training at Drupal GovCon - August 2026
  • Drupal's Site-Building Direction Isn't Settled Yet. Here's How to Build Anyway.
  • I Built a Daily Content Delivery System. Drupal is the Glue. Claude Connects the Pieces

Request the Starter Site
Schedule a Consultation
Share on Facebook (opens in new tab) Share on X (opens in new tab) Share on LinkedIn (opens in new tab) Share by email

Copyright 2026 DrupalHelps.com | Rod Martin

Drupal is a registered trademark of Dries Buytaert.