Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Mothership provides a "drush" command that allows users to quickly and simply create a sub theme.
Create the sub theme
- Install Mothership in the sites/all/themes folder.
- Copy the mothership/NEWTHEME folder to either sites/all/themes/NEWTHEME/ or, if for a multi-site setup, the site folder sites/[sitename]/themes/NEWTHEME.
- Rename the NEWTHEME folder. In this example, it is called "blackpearl".
- Change the name of the .info.example file (remove the .example part and change the name, such as to blackpearl.info) and the descriptive name found in the .info file, name = The Black Pearl
- Optional: open the template.php file and search/replace all the theme functions i.e. replace 'NEWTHEME' with 'blackpearl'.
- The theme is now ready for assembly. Go to the Appearance page /admin/appearance/list, enable the sub theme, and set it as the default. Note: The base Mothership theme does not have to be activated.
Change an existing theme to a sub theme
If you have an existing theme, you can make use of the Mothership cleanups by adding it as the base theme in your themename.info file (Line 7 in the image).