Downloading and configuring Drupal via tarballfor Drupal 8 , 9 , 10 , and 11

Last updated :  

Introduction

In the previous lesson, you set up a Drupal 10 site using Composer, providing a foundation for scalable and maintainable sites. However, some scenarios might call for more granular control over the installation process. This is where downloading Drupal via a tarball comes in handy. In this lesson, we will guide you through downloading, extracting, and configuring a Drupal site using a tarball, offering you a more hands-on approach to setup.

Understanding the Tarball Method

A tarball is a compressed archive file, commonly used for distribution in Linux environments. By downloading Drupal as a tarball, you can manually take care of each installation step, which can be beneficial for learning purposes or environments where Composer is unavailable. Additionally, the tarball approach ensures that you fully grasp what each component of your Drupal site does.

Prerequisites

Before proceeding with the manual installation, ensure that you have:

  • A web server configured with Apache or Nginx.
  • PHP version 8.1 or higher, with necessary extensions such as gd, mbstring, and xml.
  • MySQL version 5.7.8+ or MariaDB version 10.3.7+.
  • Access to a terminal or command line interface.

Downloading the Tarball

First, download the latest Drupal tarball from the official website. Follow these steps:

  1. Visit the Drupal download page.
  2. Copy the download link for the latest Drupal version.
  3. Open your terminal and navigate to the directory where you want to install Drupal.
  4. Use wget or curl to download the tarball. Example with wget:
  5. wget https://ftp.drupal.org/files/projects/drupal-x.x.tar.gz

Extracting the Tarball

Now that you've downloaded the tarball, extract its contents:

  1. Run the following command in your terminal to extract the file:
  2. tar -zxvf drupal-x.x.tar.gz
  3. This command will unpack Drupal into a directory called drupal-x.x.
  4. Move the extracted contents to your desired web directory (e.g., /var/www/html/drupal):
  5. mv drupal-x.x /var/www/html/drupal

Configuring Basic Settings

Once extracted, prepare your site for installation:

  1. Navigate to the sites/default directory:
  2. cd /var/www/html/drupal/sites/default
  3. Copy the default settings file:
  4. cp default.settings.php settings.php
  5. Adjust permissions to ensure the webserver can write to the settings file during installation:
  6. chmod 664 settings.php

Setting Up the Database

Drupal requires a database to store content and configuration. Follow these steps to set up your database:

  1. Create a new database for Drupal in your preferred database tool.
  2. Note down your database name, username, and password for use during the setup process.

Running the Installation Script

With everything in place, run the installation script to complete your setup:

  1. Open your web browser and navigate to your Drupal directory, e.g., http://localhost/drupal.
  2. Follow the on-screen prompts to select your language, verify requirements, and enter database details.
  3. Ensure to point Drupal’s installation to the database and user credentials you created.

Conclusion

You've successfully downloaded and configured Drupal via tarball, providing you a deeper insight into Drupal's manual setup. Regularly managing your setup directly can foster a strong understanding of Drupal’s back-end workings.

Next Lesson Preview: Setting Up settings.php for Database Connection

For our next lesson, we will delve into configuring your settings.php file for database connections, optimizing your site's performance, and ensuring secure connections. We will guide you step-by-step through this crucial setup process. Stay tuned!