Skip to content

Instantly share code, notes, and snippets.

@jonpugh
Last active December 30, 2015 19:19
Show Gist options
  • Save jonpugh/7873572 to your computer and use it in GitHub Desktop.
Save jonpugh/7873572 to your computer and use it in GitHub Desktop.
Getting a drupal site up locally in least time possible with the least dependencies. I want to make this a new command. Just some brainstorming.
# Install Drush
# Install Git
# Install MySQL
# Get drupal codebase
git clone git@github.com:your/repo.git
cd repo
# Create drush alias
$aliases['sitename'] = array(
'uri' => 'sitename:8888',
'root' => '/home/user/path/to/site',
'default-server' => 'sitename:8888',
);
# Edit hosts file.
127.0.0.1 sitename
# Run site-install. This also creates the database, sets up our sites/default/settings.php and files folder for us.
drush @sitename site-install --db-url=mysql://root:MySqlRootPw@localhost/dbname
# This runs a lightweight PHP server with tailing error log, making for instantly easy development.
drush @sitename run-server
# Visit your site:
http://sitename:8888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment