Following up on my review of the book Drupal 7 First Look, here's a closer look at the creation of my first Drupal 7 site: a generic "sandbox" site to be used as the base for future sites. While every Drupal site you or I create will call for its own unique setup, there are parts of a Drupal configuration that I'll likely want to replicate on any new site, such as installation of key modules, or creation of useful roles and vocabularies that I always end up using. I'd prefer to do those things just once, rather than from scratch every time; hence the sandbox site.
Here's what I did. Drupal beginners, see whether there's something useful in there for you.
A few D7 surprises
First, a tangent: As mentioned briefly in the above review, my initial contact with D7 turned up some surprises. The good kind. Like these:
- Creating a password? D7 has a built-in checker for password strength.
- User accounts can be cancelled.
- Admin features are hugely improved; in particular, I love the overlays, which load much faster for me than do D6 admin pages. It feels very "Web 2.0". But that's not as important for me as it will be for site clients, for whom Drupal admin pages have proven daunting in the past.
- There's lots of great built-in stuff like dead-simple cron, image handling, language-specific search, and nifty "upload from URL" themes and modules. The latter process neatly installs modules into sites/all/modules, just where we used to have to place them manually. It's incredibly quick and simple, and in my opinion calls for an extra round of applause for the D7 creators.
Creating the sandbox site
Start with a default installation
The first step in creating the sandbox site is simply to create a default D7 installation and site. That's a topic covered in any number of basic Drupal how-to guides, and of course in D7's own installation instructions, so there's no need to repeat things here.
What we're interested in here are the changes that come next:
Enable core modules
admin/modules
I enabled most core modules. Blog, Book, Contact, Statistics, Forum, Poll, and most others are modules I tend to use on any site.
Configure content types
admin/structure/types
I added an Image field to the Basic Page and Blog content types.
For all content types, I made sure both Alt field and Title field are enabled for images. (It's good SEO practice.)
I added a "Poll intro" field to the Poll content type. (On any site for which I've used polls, it's seemed to me only natural to have a field to explain the poll question or otherwise offer background info.)
In the Description field of each content type, I made a few changes that reflect my personal preferences. These include capitalization of the content type names (so it's Basic Page, not Basic page), and improved description text. I also copied the latter text into the blank "Explanation or submission guidelines" field for all types. The purpose is simple: I want my sites to offer admins and users, who may not be familiar with Drupal, clear instructions on the nature and general usage of common content types.

Configure text input formats
admin/config/content/formats
Setting up text input formats is important. My changes include:
I placed the Full HTML text format first among the formats, to make it the default for admins. (Users without permission to use it won't see it anyway.)
I made changes to the Filtered HTML format, such as checking "Limit allowed HTML tags" (a good security feature) and "Add rel="nofollow" to all links" (an anti-spam measure).
Create dummy content
node/add
I created a sample Article as dummy content to see how the front page looks with something displayed.
Similarly, I created a dummy About page, as something to place in the primary menu and make sure things are working right.
Configure miscellaneous items
I filled in Site Information with some dummy values (config/system/site-information). This, of course, will be the first place to make changes when setting up a real site based on the sandbox!
I enabled access logging and content viewing counters (config/system/statistics).
I added a simple "thank you" message to the Contact form auto-reply (admin/structure/contact).
Configure roles and permissions
admin/people/permissions
Managing permissions is important in Drupal – and, as it's a somewhat bothersome task, is a good one to handle in the sandbox.
I find it useful to have a role, which I call editor, holding permissions between that of authenticated user and administrator. I make sure the administrator role has all permissions and the editor role has almost as many (generally, any related to managing content and general non-dangerous site functions, with some "trusted" functions, such as Full HTML text format, added).
Anonymous users get a few permissions (viewing nodes, poll results, etc., plus posting comments and voting in polls).
Authenticated users have just a few more permissions than anonymous, including using users' personal contact forms and posting Forum Topics.
That's all for the default sandbox; these settings must be carefully thought out for each end site, and may change a lot. (In particular, many sites will call for giving authenticated users many more permissions, especially where creating content is concerned.)
Create basic taxonomy infrastructure
admin/structure/taxonomy
My older sandbox sites had two built-in vocabularies, called "Content Type" and "Content Topic". The former would tag what the piece of content is (an article, general info, news, a report, etc.), and the second would tag what the piece of content is about (generally, site-specific, though with some always-useful Terms like "site" or "us"). That allowed neat tagging for just about anything, such as "general info" and "us" for a page of info about the company behind the site, or "news" and "site" for an announcement about new site features.
However, I've come to see that content type generally take cares of the former vocabulary's purpose. Meanwhile, it wasn't always clear which of my two vocabularies some Terms should go under. For that reason, I'm going to try to combine them into a single Vocabulary called "Content Topic" for my new sandbox.
Most Terms will end up being specific to the end site, but I'm preloading the sandbox with a few Terms that I seem to find useful on almost any site:
- general info
- how-to
- news
- resource
- site
- us
Enable third-party modules
admin/modules
The above completes the initial sandbox setup. Now it's time to add third-party modules... which, filtering for 7.x compatibility, still appear to number almost 1500. Good thing the drupal.org modules list allows sorting by "Most installed", letting me get right to the best ones.
Here are the favorites I'm enshrining in the sandbox:
What are your favorites that you'd add?
Putting the 'box into action
There. When I next go to build a new D7 site, I'll just build the new one on a copy of the sandbox site's database. Instead of starting from scratch, I'll be starting from a half-built site with common configuration preferences already set up.
So am I done with the sandbox site? Not at all. I'm still new to D7, and as I build sites, I'll likely notice plenty more configuration changes I'll want to add to my D7 sandbox. You can probably think of many additions you'd want for your own; for example, if you generally use Google Adsense on your sites, it'd make sense to configure that once in the sandbox site, and not configure it anew with every site.
Tell me what you think. What common setup tasks would you add to all of the above?
Hello! I just would like to give a huge thumbs up for the great info you have here on this post...
I may not have a chance to test that for a while, but meanwhile I welcome commentary from anyone...
Hey,
Since I still see some links here, and the guide is quite good, I thought that I may...
Nice article i like the way you thoroughly wrote it.