Installing Drupal 8 from the command line without Composer or Drush

You might read my tutorial on Installing Drupal 7 from the command line first as it is more in depth. I am troubleshooting an error I have installing Drupal 8 with Composer and trying to discern if it is my LAMP stack or Drupal 8 or Composer by process of elimination.

Since I am using Apache User Directory to serve my web application from public_html in the users directory, I like to make sure I start in the user home.

[user@ip-xxx-xx-x-xxx public_html]$ cd ~

I then go into the public_html directory.

[user@ip-xxx-xx-x-xxx public_html]$ cd public_html

I have a habit of listing the contents of directories I enter just be sure it looks like I want it to.

[user@ip-xxx-xx-x-xxx public_html]$ ls

I download the latest version of Drupal to public_html using wget. I find the latest version of Drupal go to This version at the time of this post is 8.5.5 so I will download it.

[user@ip-xxx-xx-x-xxx public_html]$ wget

I list all the files in public_html and should see drupal-8.5.5.tar.gz

[user@ip-xxx-xx-x-xxx public_html]$ ls

It is a zipped fie. I will unpack the zipped files directly into the directory, public_html.
[user@ip-xxx-xx-x-xxx public_html]$ tar --strip-components=1 -xvzf drupal-8.5.5.tar.gz

This will extract all contents of drupal-8.5.5.tar.gz but also leave the drupal-8.5.5.tar.gz in public_html. If you want to you can remove it from public_html.

[user@ip-xxx-xx-x-xxx public_html]$ rm drupal-8.5.5.tar.gz

Go to the url where you are attempting to install Drupal 8 and start the web installer.

Depending on how your server is set up you might see the following errors. This is because “Drupal” did not have permission to create files or directories  on the server. No worries you will just change them.


So let’s mikes the files directory first in /sites/default/

Starting in public_html

[user@ip-xxx-xx-x-xxx default]$ cd sites

[user@ip-xxx-xx-x-xxx default]$ cd default

[user@ip-xxx-xx-x-xxx default]$ mkdir files


Now back to web installer and refresh. We see a different error.

Since this error has to do with the directory being writable I will just add write permissions for the all, the user, group and other users.

[user@ip-xxx-xx-x-xxx default]$ chmod a+w files

Basically this simply is
chmod who=permissions filename where a = all= user, group, and other and w = write.

That cleans that error up. There is only one more. The Settings file does not exist.

Drupal give you and example settings file you can copy and rename. One thing to note,
in this tutorialyou are currently in the default directory or /sites/default relative to public_html. Relative to your user home directory you are at /user/public_html/sites/default. Relative to the root of your file system you are at /home/user/public_html/sites/default.

It is always good to know where you are. Again if you are following this post you are current in the default directory.

We need to copy default.settings.php and rename it settings.php.

[user@ip-xxx-xx-x-xxx defaultl]$ cp default.settings.php settings.php

Alright we are almost set. One more error. Now we have to make the Settings file writable.


Similar to what we did above. Let’s go ahead and grant write permissions to all. However we will need to lessen the permissions later.

[user@ip-xxx-xx-x-xxx default]$ chmod a+w settings.php


And now let’s finish the install by configuring Drupal to connect to our database. This post assume you have a database set up already.

Leave a Reply

Your email address will not be published. Required fields are marked *