How to deploy Drupal CMS
Step 1: Prep Cleavr
- Provision a new server
- Click add site, select PHP site, add public to web directory, and then click to add site
- In Server > Database, install MySQL 8
- Once MySQL is installed, add a new database (such as name: drupal, username: admin, password: your password)
- Add your SSH key to the server, apply
cleavr
user
Step 2: Download Drupal
Install the zip file for the version you’d like. Here is a link to install the current version - https://www.drupal.org/download
Once drupal file is downloaded, add it to the following directory on your server:
/home/cleavr/<site name>/current
You can use an SFTP client to move the zipped file.
Step 3: Server Install Steps
- SSH into your server as cleavr
- Go to
/home/cleavr/<your site>/current
directory - Remove the current public folder with
rmdir public
command as we’ll rename the unzipped drupal folder to public - Unzip the zipped folder using
unzip <drupal file name>.zip
command - Once unzipped, rename the unzipped folder:
mv <drupal folder name> public
- Navigate to the following folder:
cd /sites/default
- Create a new folder:
mkdir files
- Now, change permissions:
chmod a+w files
- Next, there is a default settings file that we’ll copy and rename:
cp default.settings.php settings.php
- Change permissions for settings.php:
chmod a+w settings.php
Step 4: Complete Setup On Drupal’s Web Interface
The server should all be good to go. Now, open a browser and navigate to the domain that was created for your site in Cleavr.
Go through the setup prompts. When asked, enter the database name, username, and password that you created for your MySQL server during the Cleavr setup portion.