Run the install script

Last modified: September 11, 2008 - 17:48

To run the install script point your browser to the base URL of your website.

The base URL is defined in your Web server configuration file and is specific to the document root where you placed your Drupal files. If you have installed Drupal on a Web server this will likely be a domain name such as http://example.com. If you have installed Drupal on your desktop machine this URL might be http://localhost.

You will be guided through several screens to set up the database, create tables,

add the first user account and provide basic web site settings.

Note

If your site is not configured for clean url's you can troubleshoot this later. The Update notifications box will check for later versions of Drupal and contributed modules. If you are without or have restricted Internet connectivity you may want to uncheck this for now and test and enable it later.

On success, you will see the Drupal installation complete screen. If there are any error message, review and correct them now.

The install script will attempt to create a files storage directory in the default location at sites/default/files (the location of the files directory may be changed after Drupal is installed). In some cases, you may need to create the directory and modify its permissions manually. Use the following commands (from the installation directory) to create the files directory and grant the web server write privileges to it:

mkdir sites/default/files

chmod o+w sites/default/files

The install script will attempt to write-protect the sites/default directory after creating the settings.php file. If you make manual changes to that file later, be sure to protect it again after making your modifications. Failure to remove write permissions to that file is a security risk. Although the default location for the settings.php file is at sites/default/settings.php, it may be in another location if you use the multi-site setup, as explained below.

If installing in subfolder

crispy - July 7, 2009 - 23:05

Instruction says to start web-based install go to http://example.com

To run the install script point your browser to the base URL of your website.

Perhaps that's accurate if you're installing in the root.

But if installing in subfolder, for me I had to specifically point to the install.php file:

http://example.com/subfolder/install.php

in order to get the initial installation page to come up. Without pointing to install.php (http://example.com/subfolde) I got a host of errors and no installation page.

Symbolic link

mdlamar - November 6, 2009 - 15:56

You most likely need a symbolic link in your base public html directory.

sudo ln -s /path/to/public/html/drupal /path/to/public/html/subfolder

This will tell your server that anytime someone requests http://example.com/subfolder to point to http://example.com/drupal/ and index.php inside the drupal directory will take care of pointing it to the right settings.php file in a multi-site setup.

Installing Drupal-6.13 on OS X

aziff - July 22, 2009 - 04:43

Thought I'd share what seems to have worked for me to install Drupal-6.13 on OS X (not server), Leopard (10.5.7), Apache2

1) Install Drupal 6.13 as /Users/xxx/Sites/drupal, user xxx is in the "_www" group and make the entire installation is group writable. Create a soft link from /Library/WebServer/Documents/xxx -> /Users/xxx/Sites (This is purely a test installation so I didn't want this in my system document root.).

2) Re-writing seems to be enabled by default in Apache2 on Leopard. Enable PHP5 and virtual hosts in Apache2, i.e. by uncommenting these lines in /etc/apache2/httpd.conf:

#
# Dynamic Shared Object (DSO) Support
#
...
LoadModule libexec/apache2/libphp5.so

...

# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

3) Add a virtual host stanza to the /private/etc/apache2/extra/httpd-vhosts.conf file that has at least this in it:

<VirtualHost *:80>
    DocumentRoot /Library/WebServer/Documents
    ServerName localhost
   
    <Directory "/Library/WebServer/Documents">
        Options FollowSymLinks Indexes MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

4) Add a variant of the RewriteBase /drupal line in the stock /Users/xxx/Sites/drupal/.htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine on

...

# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
RewriteBase /xxx/drupal

...

# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

5) Make a copy of the /Users/xxx/Sites/drupal/sites/default directory tree as /Users/xxx/Sites/drupal/sites/localhost. Make sure this directory is writable by the _www group.

6) Manually create the database in MySQL. Make a copy of
/Users/xxx/Sites/drupal/sites/localhost/default.settings.php file as /Users/xxx/Sites/drupal/sites/settings.php and make this file writable by the _www group. Configure the database in /Users/xxx/Sites/drupal/sites/settings.php

/**
* Database settings:
*
...
*/
#$db_url = 'mysql://username:password@localhost/databasename';

7) Rebuild PHP5 to include the GD tools according to the instructions here.

8) Point a browser manually at http://localhost/xxx/drupal/install.php. The pages came up as shown on the Run the install script.

"files" has to be created first

igorgrin - August 25, 2009 - 18:05

sites/default/files directory has to be created PRIOR to running the install script. The install script checks for it and gives you an error if "files" is not there.

http://drupal.org/node/394704

Apache2 on Windows problem: Forbidden You don't have permission.

myqyl4 - October 23, 2009 - 17:52

If you installed on windows and are virtually serving you drupal install, you might get this error

Forbidden You don't have permission.

If You get this error,
Edit Apache httpd.conf

Find the following Entry

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#

<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

Update it and add index.php as a valid Directory index

i.e. It should look something like this now:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#

<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

Save and restart Apache.

Install failures

abaddon - October 28, 2009 - 08:09

when install fails for you, a setup step returns to the same step without actually doing anything make sure you check the following:

1. you have cookies (and maybe JS) enabled for the site in question
certain firefox extensions are blocking cookies selectively for security

2. settings.php is writable
this is a check step in the drupal install process so unless youve changed something while installing, it should be writable

3. last and most important! make sure you dont just rename default.settings.php to settings.php, COPY IT, default.settings.php has to be there or else the database setup step will return to the same page without doing anything, not sure why its like that but it is, i wasted hours on this one stepping the code in the install process..
to make it clearer, make sure you have both the original default.settings.php AND settings.php in your site files folder

have fun!

Installing at a webhost

redtroll - October 30, 2009 - 19:54

I had problem installing at a webhost.
Got Internal server error all the time.

Edit the .htaccess file that comes with Drupal and add a # before these comments:
Options FollowSymlinks and Options Indexes

That solved my problem.

Good luck!

URL when install

Ccming - November 1, 2009 - 09:37

It didn't work when I type http://localhost
but it works when you type http://localhost/index.php (I extracted all files to htdocs)
Don't forget restart your apache

experience web2.0

you probably dont have

abaddon - November 4, 2009 - 15:04

you probably dont have index.php set as DirectoryIndex in apache, its a local issue because your server is not configured properly

 
 

Drupal is a registered trademark of Dries Buytaert.