How to Install Drupal in Control Web Panel

Install Drupal 9 in Control Web Panel
How to Install Drupal 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. InMotion Hosting is a trusted Drupal host and contributor, with years of experience supporting Drupal users globally.

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

How to Install Drupal 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 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 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 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 site info and admin user
  7. Click Save and continue to see your new Drupal site.

Getting Started with Drupal

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

  • Make sure you know how to log into the Drupal backend.
  • If your domain is already being publicized, consider enabling maintenance mode until development is complete.
  • Install an SSL certificate for the domain via CWP or Certbot.
  • 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.
  • Install plugins for search engine optimization (SEO) and accessibility including Real-time SEO, Metatag, and Simple XML Sitemap.
  • Configure automated Drupal backups.
  • 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 About Drupal

There’s plenty more to learn about the Drupal 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 support for custom development.

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

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

Was this article helpful? Join the conversation!

Questions about our MailChannels Deployment? We have answers and are here to help!Learn More
+