The Cheeky Monkey Media Blog

A few words from the apes, monkeys, and various primates that make up the Cheeky Monkey Super Squad.

Install Drupal 7 banner

Drupal 7 is by far my favorite CMS to date and Zurb Foundation is currently my go-to theme. Although, I wouldn’t really call Foundation a theme, but more of a responsive front-end framework that you can use to build your themes.

Here is how to set up a fresh copy of Drupal 7 and configure a Foundation sub-theme quickly to get your project up and running:

Install Drupal Using Drush

Although you can do this all the old fashion way, I prefer to use Drush for this. Here are the Drush commands to make this all happen:

drush dl drupal --drupal-project-rename=drupalsitename</Users/kaidenmcfayden-faint/Documents/sites/cheekyinternal>

This command will download the latest version of drupal and rename the directory to “drupalsitename”. Rename “drupalsitename” to whatever you want to call your new drupal project.

cd drupalsitename</Users/kaidenmcfayden-faint/Documents/sites/cheekyinternal>

This command is straightforward – it puts you inside the drupal root directory, which is where you need to be for the next few commands.

drush site-install standard --account-name=username --account-pass=password --db-url=mysql://username:password@localhost/drupalsitedb</Users/kaidenmcfayden-faint/Documents/sites/cheekyinternal>

This command will configure drupal and create a new database. Replace the account username and password accordingly to what you want your drupal root user to be. Replace the MySQL username and password with your proper MySQL credentials and rename “drupalsitedb” to whatever you want to call your new database.

Foundation Sub-theme Using Drush

Now that Drupal 7 has been installed, we need to download the latest Zurb Foundation theme. To do this, run the following command:

drush dl zurb_foundation</Users/kaidenmcfayden-faint/Documents/sites/cheekyinternal>

This will download the latest stable release of Zurb Foundation into the sites/all/themes directory.

At the time of writing this post, the latest release is 7.x-4.1 and uses Foundation 4. This will work just fine, however, I prefer to use Foundation 5, so you may want to download the latest version that runs on Foundation 5 (7.x-5.0-rc6).

To do this, you need to specify the version number when you download the theme like so:

drush dl zurb_foundation-7.x-5.0-rc6</Users/kaidenmcfayden-faint/Documents/sites/cheekyinternal>

Next, we need to create a foundation sub-theme. This is what we will use to build our new theme. Run the following command:

drush fst drupalthemename</Users/kaidenmcfayden-faint/Documents/sites/cheekyinternal>

This will create a proper Foundation sub-theme and place it in the sites/default/themes directory. Replace “drupalthemename” with the name of your theme.

Finally, navigate to /admin/appearance and make sure your new theme is enabled and set to default. You can also do this in Drush using the following command:

drush vset theme_default drupalthemename</Users/kaidenmcfayden-faint/Documents/sites/cheekyinternal>

At this point, drupal is now set up and configured with your new custom Foundation sub-theme. It’s now time to roll up those sleeves and start coding!

If you or your team needs some help with Drupal Development, let us know! We do a lot of backend work for agencies that need more hands-on-deck to finish big projects. Give us a call!