Building a Drupal 7 Photo Blog using Drush on Shared Hosting

Register a URL with your favorite registrar and point the DNS to your hosting account. After you have set up the domain with your web host, create a new database and database user for your website-be sure your database user is assigned all privileges when you associate it with the database for the site.

If you haven’t done so already, set up shell access with your host. You will probably have to write your host to enable it for your account (if your host doesn’t allow jailed shell access, you would be better off with a different host…).

The fastest way to install and maintain Drupal is by using Drush - It’s easy to set up - download the Drush files to the lowest-level directory available on your shared hosting account. To do that, SSh to the directory then use wget “drush download target location” to download Drush (you will need to replace “drush download target location” with the URL of the most recent Drush tar.gz file on the Drush project page). After that, unpack the tar.gz file using tar -xvf drush*

To use Drush after that, create a Bash alias to your Drush location - something like alias drush=’~/drush/drush’ will probably work - then run drush to see a list of available commands. See if you need to try something else to get the alias to work on your host.

After that bit is set up, go to the public_html directory for your new domain on your webhost (which may or may not be named public_html depending on how your host is configured) then run

drush dl drupal-7.(insert number of most recent d7 release - drush dl drupal-7.x will install the most recent dev version of D7 which you probably don’t want)


drush site-install standard –account-name=admin –account-pass=admin –db-url=mysql://YourMySQLUser:RandomPassword@localhost/YourMySQLDatabase

…to set up your Drupal 7 site using Drush.

You will probably need to keep the account-name and account-pass for Drush to work but will have to replace the YourMySQLUser:RandomPassword and YourMySQLDatabase bits with your own information.

Depending on your host and the location of your Drupal installation, you may need to adjust the .htaccess file created by Drupal. For my Hostmonster websites located in subdirectories, I need to add the following to the bottom of the .htaccess file:

# $Id$
RewriteCond %{HTTP_HOST} ^$ [OR]
RewriteCond %{HTTP_HOST} ^$
RewriteRule ^/?$ "http\:\/\/www\.NEWDOMAIN\.com" [R=301,L]

Replace NEWDOMAIN and MAINDOMAIN with your particulars.

Be sure to check out the drupal Image module documentation. Previous versions of Drupal needed lots of additional modules to achieve decent image handling. Drupal 7 has quite nice built-in image features, thankfully.

To gain some control of how and where images land on the page, install the Insert module (formerly File Field Insert in Drupal 6).

Nodewords replacement (meta tags):

google analytics:

page title:


add watermark:

xml sitemap: