Skip to main content

Drupal CMS aka Drupal Starshot has been launched! Here is how to install it on shared hosting servers using cPanel

Posted by Ferdinand on January 18, 2025 | Comments | Last updated on January 22, 2025
Drupal Starshot logo in the midst of web servers

Drupal CMS 1.0 was released on January 15th 2025 as scheduled, just eight months after the idea was first announced! The release is a milestone achievement by the Drupal community as it is the beginning of a journey that many believe will open up Drupal to many users that ordinarily will not be able to use Drupal.

Drupal CMS is not a different software from the Drupal that has been available all along. It is still the same Drupal. What is different and why everyone is excited is because Drupal CMS comes with prepackaged functionality, reducing drastically the time to set things up if one had started with Drupal core and installed modules. Drupal CMS is Drupal core bundled with prepackaged functionality produced by a combination of modules and configuration. So when you install it, you can find a recipe, apply it, and it adds the required modules and bundles their configuration along. So you will get a complete feature out of the box! Normally, if you install the same modules on Drupal core, it might take a few days to produce the same configuration.

With Drupal CMS, you can install modules, themes and recipes on the interface. You won't need Composer anymore. When you install a module on the UI, the site will automatically update your composer.json so it is still Composer but this time you don't have to worry about it. If you are a developer, then the site helps you to update composer.json so you can update it and the site takes over from you, and you take over from the site again. I did say you won't need Composer anymore, but that will be at least after you have launched the site, because from what I can see so far, you will still need Composer to install the site in the first place.

With Drupal CMS, there is automatic updates, so you can update Drupal core and modules on the interface. This is an absolute game changer for Drupal as it was only possible with Drupal 7 to update modules on the interface but not core. This will drastically reduce the cost of owning Drupal sites as owners can now keep their sites updated by themselves without relying on their developers to do that for them.

You can see why we in the Drupal community are so excited about this.

What was released is version 1.0 We are all hoping for improvements as further releases are made. One notable feature being eagerly awaited is Experience Builder. It will be added in a later version, and it will be a major improvement to the present Layout Builder in the current version.

IT WILL BE GOOD TO MENTION 

It will be good to mention that adding prepackaged complete functionality is a feature driven by recipes which Drupal CMS ships with and offers lots of them and will offer even more as it matures. Recipes are what bundles modules and configuration in one package, you apply it to your website, and you get a complete solution out of the box. For example, you will add a blog recipe, and you get a complete blog feature on your site ready for you to just start writing. You add an SEO recipe and all the modules you need for SEO are installed and configured for you.

Now, recipes are not exclusive to Drupal CMS. You can apply recipes to any Drupal site whether started with Drupal core or Drupal CMS. Likewise, other features like automatic updates, project browser, experience builder, etc., can all be used on Drupal core also.

Many, if not all, of the initiatives that congregated into Starshot were on course before the idea of Starshot was announced: recipes, automatic updates, project browser, had all been on course.

Now about installation.

How to install Drupal CMS

On the download page for Drupal CMS, as at the time of writing, is this message,

Drupal CMS installation options

Let us look at each one of the options:

  1. Composer command

    First will be the Composer command, composer create-project drupal/cms 

    If you run this command, Composer will download Drupal CMS for you. It will not just download the Drupal CMS installer, it will download the full project at once. You will then use your favorite development tool to launch it and start setting up the site.

  2. Install with DDEV

    The link here will take you to the page where you will see steps and instructions to install Drupal CMS with DDEV. DDEV is a local development tool like Lando, WAMP, XAMPP, and the like.

    Following the guide, there's a Bash script ./launch-drupal-cms.sh designed to automate the entire installation process. This script is specifically tailored for Unix-like environments (Linux, macOS, or the Windows Subsystem for Linux (WSL)).

    For Windows users like me, running this script directly might not work flawlessly without the right setup. From my experience and understanding so far, to run this script successfully on a Windows machine, you need to:

    a. Enable the Windows Subsystem for Linux (WSL) and Virtual Machine Platform features.

    b. Install a Linux distribution (such as Ubuntu) via the Microsoft Store.

    c. Launch the WSL terminal and execute the script from there.

    This setup provides the required Unix-like environment for the script to function properly. If you’re using Windows without a Linux distribution installed and have managed to get this script running, feel free to share your experience in the comments!

    Notwithstanding, I still installed Drupal CMS with DDEV on my Windows PC.

    HOW I INSTALLED DRUPAL CMS WITH DDEV ON MY WINDOWS COMPUTER WITHOUT A LINUX DISTRIBUTION INSTALLED

    I have been using DDEV to build sites, so what I did was I downloaded Drupal CMS with Composer. I navigated to the folder and ran ddev config as I would normally configure any other Drupal website on DDEV. I completed the configuration and ran ddev start. The process proceeded as it would for any other Drupal project, then I ran ddev launch and the site was launched successfully. 

    Note that as I decided to use DDEV for development, I could as well have used Lando or WAMP or XAMPP or any other development tool of my choice to set up the site, after I downloaded Drupal CMS with Composer.

  3. Download Drupal CMS .zip

    This will download the Drupal CMS Installer. You will need to download the full project with Composer, and then you can handle development with any local development tool of your choice.

DEPLOYING TO SHARED HOST PLANS ESPECIALLY DEPLOYING INSIDE PUBLIC_HTML OF CPANEL

Since Composer was introduced in Drupal 8, it will install Drupal inside a web web-root by default. This has come to mean that the Drupal community assumes that your web-root will be named web.

This is not the case when you purchase a shared host plan with most of the hosting providers using cPanel and cPanel will have public_html as the default web-root.

So how will you install Drupal CMS into public_html?

I will demonstrate this using the method I used for my installation above, which is downloading Drupal CMS with Composer and then developing with DDEV. Let's get through it:

  1. Download the Drupal CMS Installer with Composer by the running the command,

    composer create-project --no-install drupal/cms

    Notice that this is slightly different from the command on the Drupal download page, which is composer create-project drupal/cms. Note that I have introduced a --no-install flag which will stop the installation of the full Drupal CMS project upon project initiation.

    This is called a modified install

    Note that you can make a modified install with any of the installation options on the Drupal download page. When you download the .zip file, you will modify the web-root before proceeding with your choice of development.

  2. Here is the folder structure of what Composer downloaded when it initiated the project,

    Drupal CMS initial folder structure

    Now rename web to public_html as shown below,

    Drupal cms zip file edited

  3. Open the project in an editor like VS Code and edit composer.json. 

    Replace all occurrences of web/ to public_html/ as shown below:

    Web root before

    Before

    Web root after

    After

  4. Go back to the terminal and from the project root run the command

    composer install

    Composer will now download the full Drupal CMS project, but this time they will be downloaded inside public_html folder instead of the default web folder

  5. Install the site with DDEV (remember you can choose to install with Lando, WAMP, XAMPP or any other development tool of your choice)

    Making sure DDEV is ready on your system, go on a terminal and navigate to root of the project and run the command,

    ddev config

    Enter your project name.

    DDEV Project Name

    Enter your docroot

    DDEV docroot

    DDEV will detect you have a Drupal 11 project inside your docroot and will suggest that Project type, so just press Enter,

    DDEV Project type

    Configuration is complete,

    DDEV configuration complete

    Next step is to run the command,

    ddev start

    DDEV will take some time to set up the environment for your site and when done you will use this command to launch your site on your browser,

    ddev launch

    You can now configure your site and start building.

  6. Deploy to your host account 

    By now you can tell that the folder structure on your projects aligns with that of cPanel on your host server. You can now deploy your project.

    Using Git or FTP or any of your preferred deployment methods, push/upload/copy composer.json and composer.lock to the root of your cPanel host account.

    Launch shell on your host account and navigate to the root where you have the Composer files uploaded and run the command,

    composer install --no-dev 

    (The --no-dev switch skips the installation of packages not intended for use in production.)

    Composer will download the full Drupal CMS project into the public_html folder of your host account. 

    Now deploy your database to the live server, and copy over your files folder and any other non-composer-downloaded items you had in your local site.

HOW WILL THIS WORK USING THE BASH SCRIPT?

It will be a similar process.

  1. Download the .zip file and extract it. You will have the same folder structure as below,

    Drupal CMS zip file

    Rename 'web' to 'public_html' as shown below,

    Drupal cms zip file edited

  2. Open the project in an editor like VS Code. Open composer.json and replace all occurrences of 'web' to 'public_html' as described above.
  3. Open the file 'launch-drupal-cms.sh' and edit the web-root to public_html as shown below,

    Bash web-root before

    Before

    Bash web root after

    After

  4. Now run the command,

    ./launch-drupal-cms.sh

    Drupal CMS will be installed inside the folder public_html.

MY EXPERIENCE ABOUT INSTALLING DDEV ON A WINDOWS COMPUTER

I use a Windows PC and I have been using DDEV for development before the launch of Drupal CMS. I don't have Ubuntu installed on my PC yet.

You can use DDEV on a Window computer without going the full hog to install a Linux distro. In this case, you will use Docker Desktop. Here are the steps to achieve this:

  1. Enable WSL (Windows Subsystem for Linux) and Virtual Machine Platform Features

    Launch Windows PowerShell as Administrator and run the following commands,

    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

    Alternatively, if you are more comfortable using the GUI then do it this way,

    Open Windows Features:

    1. Press Windows Key + R to open the Run dialog box.
    2. Type optionalfeatures and press Enter.
      1. This will open the Windows Features dialog box.

    Locate and Enable the Features:

    1. Scroll down and find:
      1. Windows Subsystem for Linux
      2. Virtual Machine Platform
    2. Check both boxes.
  2. Restart Your Computer

  3. Install Docker Desktop using Chocolatey

    If you do not have Chocolatey installed, go over here to see how to install it. 

    Run this command in PowerShell (as an administrator),

    choco install docker-desktop

    Once installed, restart your computer if prompted.

  4. Install DDEV using Chocolatey

    Run the command,

    choco install ddev

Once both Docker and DDEV are installed, you are good to go!

To use DDEV, you will first launch the Docker Desktop application. Once Docker Engine is started, you can use DDEV.

Please note that installing a Linux distribution via WSL and using the WSL terminal provides a robust Unix-like environment on your Windows computer. This setup is often more compatible and reliable for running tools like Docker Desktop, DDEV, and scripts designed for Linux.

Tags

16 of 16