Fake it till you make it, one-liner to generate content for a Drupal site

Devel Generate is great module for putting some dummy content on your site. You can generate taxonomy terms and vocabs, users, nodes and menus. Other modules, such as the voting API also plugin to it to generate votes.

Devel Generate also has great Drush support. This little one liner will build a site with a few vocabularies, a couple dozen terms, some users, some content and a menu or two.

VOCAB=$(drush genv — kill 3 2>&1 | tail -3 | head -n1) && drush gent — kill $VOCAB 20 && drush — kill genu 50 && drush — kill genc 200 && drush — kill genm 5

I have an alias for it, ($alias make_me_stuff=’the command above’) so when I’m starting a new project I can just hop in to the docroot and run: make_me_stuff

Jacob Singh
CTO in residence at Sequoia Capital. Independent product and Engineering Coach Mediocre guitarist, singer, rock climber, point guard and baker Dedicated dad. American in New Delhi.
New Delhi