{"id":2099,"date":"2025-12-03T02:50:12","date_gmt":"2025-06-16T08:50:02","guid":{"rendered":""},"modified":"2025-02-02T00:46:18","modified_gmt":"2025-02-01T23:46:18","slug":"how-to-install-drupal-cms-with-apache-and-free-let-039-s-encrypt-ssl-on-ubuntu-24-04","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-drupal-cms-with-apache-and-free-let-039-s-encrypt-ssl-on-ubuntu-24-04\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 Drupal CMS with Apache and Free Let&#039;s Encrypt SSL on Ubuntu 24.04"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header>\n<h1>\u00a0<\/h1>\n<\/header>\n<section>\n<p>Drupal is a powerful content management system (CMS) widely used for building websites. In this guide, we will show you how to install Drupal with Apache web server and secure it using a free Let&#8217;s Encrypt SSL certificate on Ubuntu 24.04. Whether you&#8217;re setting this up on a <strong>Windows VPS UK<\/strong>, <strong>Windows VPS<\/strong>, or any other <strong>UK Windows VPS<\/strong> environment, the steps are easy to follow.<\/p>\n<h2>Step 1: Update Your Server<\/h2>\n<p>First, ensure your system packages are up to date. SSH into your server (whether it&#8217;s a local server or a <strong>Windows VPSVirtual Private Server Hosting<\/strong> solution) and run the following commands:<\/p>\n<pre>sudo apt update &amp;&amp; sudo apt upgrade -y<\/pre>\n<h2>Step 2: Install Apache Web Server<\/h2>\n<p>Next, install Apache, the web server that will serve your Drupal site. On your <strong>VPS Windows VPS Servers<\/strong> or any <strong>Windows VPSVirtual Private Server<\/strong>, use this command:<\/p>\n<pre>sudo apt install apache2 -y<\/pre>\n<p>Once installed, start and enable Apache to run at boot:<\/p>\n<pre>sudo systemctl start apache2\r\nsudo systemctl enable apache2\r\n        <\/pre>\n<h2>Step 3: Install PHP and MySQL<\/h2>\n<p>Drupal requires both PHP and a database. To install PHP 8.1 and MySQL on your <strong>Windows VPS Hosting UK<\/strong> or Ubuntu system, run:<\/p>\n<pre>sudo apt install php libapache2-mod-php php-mysql php-xml php-gd php-curl php-zip php-mbstring -y\r\nsudo apt install mysql-server -y\r\n        <\/pre>\n<p>After installing MySQL, secure your database server:<\/p>\n<pre>sudo mysql_secure_installation<\/pre>\n<h2>Step 4: Create a MySQL Database for Drupal<\/h2>\n<p>Log in to MySQL to create a database and user for Drupal:<\/p>\n<pre>sudo mysql -u root -p<\/pre>\n<p>Then run the following commands to create the database, user, and grant necessary privileges:<\/p>\n<pre>CREATE DATABASE drupal;\r\nCREATE USER 'drupaluser'@'localhost' IDENTIFIED BY 'your_password';\r\nGRANT ALL PRIVILEGES ON drupal.* TO 'drupaluser'@'localhost';\r\nFLUSH PRIVILEGES;\r\nEXIT;\r\n        <\/pre>\n<h2>Step 5: Download and Install Drupal<\/h2>\n<p>Go to the <code>\/var\/www\/html<\/code> directory and download the latest version of Drupal:<\/p>\n<pre>cd \/var\/www\/html\r\nsudo wget https:\/\/www.drupal.org\/download-latest\/tar.gz -O drupal.tar.gz\r\nsudo tar -xzvf drupal.tar.gz\r\nsudo mv drupal-* drupal\r\n        <\/pre>\n<p>Set the proper ownership and permissions for the Drupal directory:<\/p>\n<pre>sudo chown -R www-data:www-data \/var\/www\/html\/drupal\r\nsudo chmod -R 755 \/var\/www\/html\/drupal\r\n        <\/pre>\n<h2>Step 6: Configure Apache for Drupal<\/h2>\n<p>Create a new Apache configuration file for Drupal:<\/p>\n<pre>sudo nano \/etc\/apache2\/sites-available\/drupal.conf<\/pre>\n<p>Add the following configuration:<\/p>\n<pre>\r\n    ServerAdmin admin@example.com\r\n    DocumentRoot \/var\/www\/html\/drupal\r\n    ServerName your_domain_or_ip\r\n\r\n    \r\n        AllowOverride All\r\n    \r\n\r\n    ErrorLog ${APACHE_LOG_DIR}\/drupal_error.log\r\n    CustomLog ${APACHE_LOG_DIR}\/drupal_access.log combined\r\n\r\n        <\/pre>\n<p>Enable the new site and the Apache rewrite module:<\/p>\n<pre>sudo a2ensite drupal.conf\r\nsudo a2enmod rewrite\r\nsudo systemctl restart apache2\r\n        <\/pre>\n<h2>Step 7: Install Let&#8217;s Encrypt SSL<\/h2>\n<p>Now, secure your Drupal site with a free SSL certificate from Let&#8217;s Encrypt. If you&#8217;re on a <strong>VPS Windows VPS Servers<\/strong> or <strong>Windows VPSVirtual Private Servers<\/strong>, the process is the same. First, install Certbot:<\/p>\n<pre>sudo apt install certbot python3-certbot-apache -y<\/pre>\n<p>Then, run Certbot to install and configure SSL:<\/p>\n<pre>sudo certbot --apache<\/pre>\n<p>Follow the prompts to complete the SSL setup. Certbot will automatically configure your Apache server to use SSL.<\/p>\n<h2>Step 8: Complete Drupal Installation<\/h2>\n<p>Finally, complete the Drupal installation through the web interface. Open your browser and navigate to <code>https:\/\/your_domain_or_ip<\/code>. Follow the on-screen instructions to configure the database and set up your Drupal site.<\/p>\n<h2>Conclusion<\/h2>\n<p>You\u2019ve successfully installed Drupal CMS with Apache and a free Let&#8217;s Encrypt SSL certificate on Ubuntu 24.04. Whether you&#8217;re managing a local server or a <strong>Windows VPS UK<\/strong>, <strong>Windows VPS<\/strong>, or <strong>UK Windows VPS<\/strong>, these steps will ensure a secure and functional Drupal site. For reliable <strong>Windows VPS<\/strong> solutions, visit .<\/p>\n<\/section>\n<footer>\n<p>For more information about <strong>Windows VPS Hosting UK<\/strong> and <strong>Windows VPSVirtual Private Server Hosting<\/strong>, visit <a href=\"https:\/\/ie.netcloud24.com\">netcloud24.com<\/a>.<\/p>\n<\/footer>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u00a0 \u00a0 Drupal is a powerful content management system (CMS) widely used for building websites. In this guide, we will show you how to install Drupal with Apache\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-2099","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2099","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=2099"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2099\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=2099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=2099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=2099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}