Create a Zen 7.x-5.x sub-theme - Automated using Drush

The base Zen theme is designed to be easily extended by its sub-themes. You shouldn't modify any of the CSS or PHP files in the zen/ folder; but instead you should create a sub-theme of zen which is located in a folder outside of the root zen/ folder. The examples below assume zen and your sub-theme will be installed in sites/all/themes/, but any valid theme directory is acceptable (read the sites/default/default.settings.php for more info.)

IMPORTANT NOTE: In Drupal 7, the theme system caches which template files and which theme functions should be called. This means that if you add a new theme, preprocess or process function to your template.php file or add a new template (.tpl.php) file to your sub-theme, you will need to rebuild the "theme registry." See

Drupal 7 also stores a cache of the data in .info files. If you modify any lines in your sub-theme's .info file, you MUST refresh Drupal 7's cache by simply visiting the Appearance page at admin/appearance.

This documentation is specifically for people who use Drush. You can take advantage of the drush zen command to automatically generate a sub-theme.

    Install Drush on CentOS (with H-Sphere)

    Note: I'm leaving this page as is for information purposes, but I don't recommend you follow this tutorial for installing Drush. I recommend using composer to install Drush.

    Below is how I install Drush on CentOS systems that have H-Sphere installed as a control panel

    1 - Grab a copy of Drush and untar it in your shared folder

    sudo wget --quiet -O - | sudo tar -zxf - -C /usr/local/share

    Getting started with Git (for Drupal) on Windows

    New to Git? Take a look at Introduction to Git.

    Install Git on your local machine

    Download Git for Windows. Follow the link Download for Windows.

    Install using default settings only.

    Add Git Bash to the Taskbar. Open Start menu and type git. Right-click Git Bash then click Pin this program to the taskbar. In taskbar, right-click Git Bash icon, then right-click Git Bash, then click Properties.

    • Shortcut tab: Set the Start in option to your local server's root directory (e.g c:\xampp\htdocs)
    • Options tab: set Buffer Size to 500 or something large (Buffer size is number of lines for scrollbar to go back), check Quick Edit checkbox.
    • Click OK to close Properties dialog.

    Configure git user. Open your account, click Edit, then Git access. Copy Git user configuration and paste it into Git Bash. Lines should look like this:

    git config --global "Your Name"
    git config --global
    git config --global core.autocrlf true

    Running imports and rollbacks from the UI via drush

    As explained at Why you should run migrations in Drush rather than the UI, drush is a faster and more robust means of running large migration operations than the web-based UI is. As of Migrate 2.6, it is possible (with some advanced server-side configuration) to start migration operations from the UI that will run in the background via drush on the server.

    Configuring background operations

    To enable background imports and rollbacks requires some configuration on the server side. The key element is letting the Migrate module know where the drush command resides on the server, so it can be run. This is done by setting the Drupal migrate_drush_path variable to the full path of the drush command on the server, either in settings.php:

    $conf['migrate_drush_path'] = '/usr/bin/drush';

    or by setting the variable using drush:

    $ drush vset migrate_drush_path /usr/bin/drush

    On a windows server the path of the drush command has to include 'drush.bat', e.g. like C:\ProgramData\Drush\drush.bat.

    Using Drush Rebuild

    Drush Rebuild is a utility for rebuilding a local development environment from, for example, the production environment. Drush Rebuild uses Drush aliases and an easy-to-read YAML configuration file.

    To use Rebuild you must know how to work with drush aliases.

    Installation & configuration


    Rebuild can be installed with drush or git.

    Using drush: drush dl rebuild

    Creating a Subtheme


    The placeholder page for Zurb Foundation 7.x documentation and will contain general information about creating subthemes.

    • Creating a subtheme
      • Manual
      • Drush



    Subscribe with RSS Subscribe to RSS - drush