How to Install Drupal 9 in Control Web Panel

Install Drupal 9 in Control Web Panel

Drupal is a popular content management system (CMS) for security conscious professionals who want to develop highly customized backend solutions and integrations. 

Below we’ll cover how to install Drupal 9 in Control Web Panel (CWP), formerly known as CentOS Web Panel.

How to Install Drupal 9 in Control Web Panel

These steps are for users with access to the CWP admin panel. However, regular users can follow these steps if you have the necessary PHP version installed.

  1. Log into Control Web Panel.
  2. Create a regular CWP user if you haven’t already.
  3. Create a domain or subdomain if the website will not be installed for the user’s primary domain.
  4. On the left select MySQL Manager to create a database. Skip this step if you plan to use SQLite in lieu of MySQL/MariaDB.
  5. At the top select Add new database.
    CWP MySQL Manager
  6. Select the new CWP user account, specify a database name, and utf8mb4_unicode_ci or utf8mb4_general_ci charset. Then select Save.
    Create a MySQL database in CWP
  7. Ensure you have PHP version 7.3 or higher.
  8. At the top select Terminal and Simple Terminal to open a new window. Users without SSH access can use the file manager or FTP instead.
  9. Navigate to the root directory for the domain. Shell users should “USERNAME” with the CWP username. For example:
    cd /home/USERNAME/
    cd /home/USERNAME/drupalsite/
  10. Remove the default CWP index file:
    rm index.html
  11. Download the latest version of Drupal with zip or tar:
    wget https://www.drupal.org/download-latest/zip
    wget https://www.drupal.org/download-latest/tar.gz

    File manager users will need to download the compressed file from one of those URLs and upload it to the current server directory.
  12. Extract the compressed file:
    unzip zip
    tar -xvzf tar.gz

    File manager users, right-click the file to decompress it.
  13. There’s now a new directory named “drupal-‘version-number’.” Move all files from that directory to your current directory (you may need to change the version number in the commands below):
    mv drupal-9.3.16/* ./ && mv drupal-9.3.16/.* ./
  14. Remove the now empty directory and tar file (you may need to change the version number):
    rm -rf drupal-9.3.16 zip
    rm -rf drupal-9.3.16 tar.gz
  15. Admin users will need to change the owner of the website files from “root” to the CWP user, replacing “USER” with the CWP username:
    chown -R USER:USER * .*

Drupal 9 Setup

Below we’ll cover the website setup process.

  1. Visit your Drupal domain in a web browser. You’ll be redirected to the setup wizard.
  2. Select your preferred language, then Save and continue.
    Choose Drupal 9 language preference
  3. Leave the Standard option selected unless you’re an experienced Drupal developer.
    Drupal installation profile options
  4. Review the requirements. Resolve any warnings or note them for further review later. At the bottom, select continue anyway.
    Drupal 9 requirements and recommendations reviewed
  5. Type the Drupal database name, user, and user password. Or select SQLite if that will be your database solution.
    Configure MySQL or equivalent, or SQLite
  6. Complete all required fields to complete the installation. The “site maintenance account” is the admin user account.
    Add Drupal 9 site info and admin user
  7. Click Save and continue to see your new Drupal 9 site.

Getting Started with Drupal

Here are some essential tasks to quickly get your Drupal 9 installation ready for production.

  1. Make sure you know how to log into the Drupal backend.
  2. If your domain is already being publicized, consider enabling maintenance mode until development is complete.
  3. Install an SSL certificate for the domain via CWP or Certbot.
  4. Add security HTTP headers such as Content Security Policy (CSP) and HTTP Strict Transport Security (HSTS) via web server configuration or the Security Kit module.
  5. Install plugins for search engine optimization (SEO) and accessibility including Real-time SEO, Metatag, and Simple XML Sitemap.
  6. Configure automated Drupal backups.
  7. Integrate your analytics software. Two of the most popular options are Google and Matomo Analytics. We have a guide for installing Matomo in CWP.

Learn More

There’s plenty more to learn about the Drupal 9 CMS from our Drupal Education Channel. If you’re in need of sophisticated solutions that require some coding skills, there is reputable free and paid Drupal 9 support for custom development.

As secure as Drupal is, you should still remember to harden CWP server security.

If you don’t need cPanel, don't pay for it. Only pay for what you need with our Cloud VPS solutions.

check markCentOS, Debian, or Ubuntu check markNo cPanel Bloat check markSSH Key Management

Comments

It looks like this article doesn't have any comments yet - you can be the first. If you have any comments or questions, start the conversation!

Was this article helpful? Let us know!