How to Install Drupal in Linux using Xampp

Drupal is a powerful and flexible open-source content management system (CMS) that powers websites and applications. It’s known for its scalability, security, and extensive community support. Here are some of its main features:

  1. Modularity: Drupal’s architecture is highly modular, allowing for the addition of features through thousands of modules developed by the community. This makes it adaptable to a wide range of projects from simple blogs to complex enterprise applications.
  2. Customizability: Both the appearance (through themes) and functionality (through modules) of a Drupal site can be extensively customized to meet specific requirements.
  3. Content Management: Drupal provides a robust content management system that supports content creation, content types with custom fields, taxonomy for content categorization, views for content listing and sorting, and much more.
  4. User Management: It includes a comprehensive system for user roles and permissions, allowing for detailed control over who can view and manage content.
  5. Scalability: Drupal is designed to handle sites with high traffic and vast amounts of data, making it suitable for enterprise-level deployments.
  6. Security: Security is a key focus for Drupal, with a dedicated security team working on identifying and fixing vulnerabilities. Its robust security features make it a popular choice for government and financial institutions.
  7. SEO-Friendly: Drupal has strong SEO capabilities, including customizable meta tags, automatic generation of SEO-friendly URLs, and integration with analytics tools.
  8. Community and Support: Drupal has a large, active community of developers, designers, and users who contribute to the project, offer support, and create documentation. This community provides a vast resource for troubleshooting and learning.
  9. Accessibility: Commitment to web accessibility standards ensures that Drupal websites are usable by people with disabilities, following best practices and guidelines such as WAI-ARIA.
  10. Multilingual Support: Drupal offers built-in multilingual support, allowing the creation of websites in multiple languages, which is crucial for global businesses and multicultural sites.
  11. API-first Approach: Drupal can serve as a content management system for the back end of web applications, with an API-first approach that facilitates the development of decoupled or headless applications where Drupal’s content is consumed by other applications, such as mobile apps, through APIs.

Drupal Installation Requirement

Drupal 10

Web server

Apache 2.4.7 or higher, Nginx 1.1 or higher, or any other web server with proper PHP support.

More details about web server requirements.

Database

  • MySQL 5.7.8 or higher
  • MariaDB 10.3.7 or higher
  • Percona Server 5.7.8 or higher
  • PostgreSQL 12 or higher
  • SQLite 3.26 or higher

More details about database requirements.

Memory

  • Memory requirements RAM: Minimum required memory is 1GB to make sure Composer works. If you are running multiple modules or using memory-intensive tools such as Solr, or Memcache, considerably more memory may be needed.
  • PHP memory requirements: The minimum required memory size is 64 MB, typically 128 MB or 256 MB are found in production systems. For more, see PHP memory requirements.

Be aware of the limitations of 32-bit PHP.

PHP

More details about PHP requirements.

Disk space

Minimum 100MB. You will need more space if you install additional modules or themes, and you’ll also need space for media, backups, and other files generated by and uploaded to your site.

Reference – https://www.drupal.org/docs/getting-started/system-requirements/overview

Directory strcuture of drupal with explanation

Core Directory Structure

  • core/: Contains all the files that provide the basic functionality of Drupal. This includes core modules, themes, and libraries. It’s a vital part of Drupal and should not be modified directly.
  • modules/: This directory is for custom and contributed modules that extend Drupal’s functionality. While core modules reside within the core/ directory, custom and contributed modules should be placed here to keep them separate from core code.
  • themes/: Similar to the modules/ directory, this is where you place custom and contributed themes. Themes control the look and feel of your Drupal site. The core themes are located in the core/themes/ directory.
  • profiles/: Contains installation profiles, which define a set of modules, themes, and configurations to apply during the installation process. Custom and contributed profiles go here, while core profiles are located in core/profiles/.
  • sites/: This is a crucial directory for multisite configurations. It contains configuration files, as well as site-specific modules and themes. The most important subdirectories and files include:
    • sites/default/: The default directory used by Drupal if no other site matches. It contains the default settings.php and services.yml files, which can be edited to configure the site.
    • sites/example.sites.php: An example file showing how to set up multisite configurations.
    • sites/all/: (Deprecated in Drupal 8 and later) Previously used to place modules and themes available to all sites in a multisite installation.
  • vendor/: Contains PHP libraries that Drupal depends on, including components like Symfony and Twig. This directory is managed by Composer, a dependency management tool for PHP.
  • files/: Typically found within the sites/default/ directory (e.g., sites/default/files/), this is where Drupal stores uploaded files and other site-specific files that are created during its operation.

Other Important Files and Directories

  • .htaccess: A configuration file for use on web servers running the Apache Web Server software. It includes settings that improve Drupal’s security and handling of URLs.
  • robots.txt: Provides instructions to web crawlers about which areas of the site should not be processed or scanned.
  • index.php: The main entry point for all requests to a Drupal site. It bootstraps Drupal and serves the requested page.
  • composer.json and composer.lock: These files are used by Composer to manage PHP dependencies. They define the required PHP libraries and their versions.

Step by Step installation instructiions to install Drupal in Xampp in Linux

DOWNLOAD – https://www.apachefriends.org/download.html

Installing Drupal on XAMPP in Linux involves a series of steps to set up your local environment for Drupal development. XAMPP provides an easy-to-use Apache, MariaDB (MySQL), PHP, and Perl environment. Follow these steps to get Drupal running:

Step 1: Install XAMPP

  1. Download XAMPP for Linux from the official Apache Friends website.
  2. Open a terminal and navigate to the download location.
  3. Make the installer executable with the command:

Step 2: Start XAMPP

  1. Start XAMPP with:

Step 3: Create a Database for Drupal

  1. Open phpMyAdmin in your browser by visiting http://localhost/phpmyadmin.
  2. Create a new database for Drupal (e.g., “drupal_db”).
  3. Note the database name, and create a database user and password for Drupal, or you can use the root user for local development.

Step 4: Download Drupal

  1. Download the latest version of Drupal from the official Drupal website.
  2. Extract the Drupal archive. This can be done via the terminal or a graphical file manager. If using a terminal, navigate to the download directory and use:

Step 7: Complete the Installation

  1. Once the installation is complete, Drupal will redirect you to your new site.
  2. For security, verify that the .htaccess file is in place in your Drupal directory to protect sensitive files.