I am going absolutely insane. I have been up for several hours scouring the internet, installing, removing, installing, removing, and I CANNOT get Drupal (7 or 8) to install at the root of a site (hosted Linux server, not local or vm). If I try to run the drush si with the package outside of the target site's directory structure I get the site-install needs a higher bootstrap error. Of course, if I move the the install base into the root of the target site's directory, it installs fine...in a subfolder with the name of the install base! I have followed all of the documentation, reviewed hundreds of comments on multiple sites, watched YouTube videos, looked at Pluralsight tutorials. I am at a loss. I saw suggestions to edit the settings.php file (which the install package creates during the install process and doesn't exist beforehand...). I saw suggestions to rename files that are not yet existant because the install hasn't happened. I'm sure much of these apply to an upgrade, but not a new site install. Can anyone please offer some insight into this. Installing with drush is supposed to make things easier. I have now wasted 4 hours trying to figure this out when I could have just manually installed it. But now it's principle. I want to know. Besides I might have to do this again for other sites. Thank you in advance.
When you download and install Drupal, it will install inside the directory that contains the files. So if you download Drupal into public_html and the directory with the Drupal files is called "drupal" it's going to install in
public_html/drupal. Depending on what server you are running, you will need to identify the new webroot. In this example, you would change the webroot from public_html to
public_html/drupal. The folks over at StackOverflow or your hosting company should be able to help you with your specific server settings for your new Drupal root.
Alternatively, you may be able to copy all the contents from the unzipped folder containing all the Drupal files into the webroot, but I've never tried that because I like keeping Drupal in it's own root.
sites/default/settings.php and see what it says for your Drupal root.
I had created this tutorial (Using Drush to Install Drupal 7 from Scratch) back in 2015, try it, should work for you. I just tried it in my Siteground Shared Hosting, and it worked for me (screenshot below).
Follow the instructions below to get started.
Firstly, create a Database for your New Drupal Installation and note the login credentials.
Open your terminal and change directory to your Document Root and enter the commands below:
The Web Directory/Document Root will depend on the OS you are using: Linux/Ubuntu:
Windows (XAMPP/WAMPP): C:\xampp\htdocs or C:\wamp\htdocs 7.x.
Note: here 'x' is the version number. Right now it's 7.35 so i enter drupal-7.35.
drush dl drupal-7.x
Now in your terminal change directory:
and enter the commands below:
drush site-install standard --account-name=admin --account-pass=admin --db-url=mysql://root:your_db_password@localhost/your_db_name
The Drupal username and password seem to always end up as admin/admin no matter what I set them to. So, I suggest just using those and then changing them after you login to your new site.
Also if you are using Linux/Ubutnu make sure to assign the apache-user to the directory 'files' located at 'sites/default/files.' You can do that using the command below:
sudo chown -R www-data:www-data sites/default/files