Updatedb-status List any pending database updates. Updatedb (updb) Apply any database updates required (as with running update.php). Test-clean Clean temporary tables and files. Site-ssh (ssh) Connect to a Drupal site's server via SSH for an interactive session or to run a shell command Site-set (use) Set a site alias to work on that will persist for the current session. Site-install (si) Install Drupal along with modules/themes/configuration using the specified install profile. Site-alias (sa) Print site alias records for all known site aliases and local sites. Shell-alias (sha) Print all known shell alias records. Search-status Show how many items remain to be indexed out of the total. Search-reindex Force the search index to be rebuilt. Search-index Index the remaining search items without wiping the index. Queue-list Returns a list of all defined queues Php-eval (eval, ev) Evaluate arbitrary php code after bootstrapping Drupal (if available). Image-flush Flush all derived images for a given style. Usually used with a site alias.Ĭore-quick-drupal Download, install, serve and login to Drupal with minimal configuration and dependencies.Ĭore-requirements Provides information about things that may be wrong in your Drupal installation, if any.Ĭore-rsync (rsync) Rsync the Drupal tree to/from another server using ssh.Ĭore-status (status, Provides a birds-eye view of the current Drupal installation, if any.Ĭore-topic (topic) Read detailed documentation on a given topic.ĭrupal-directory Return path to a given module/theme directory. y, -yes Assume 'yes' as answer to all prompts.Īrchive-dump (ard, Backup your code, files, and database into a single file.Īrchive-restore Expand a site archive into a Drupal web site.Ĭache-clear (cc) Clear a specific cache, or all drupal caches.Ĭache-get (cg) Fetch a cached object and display it.Ĭache-set (cs) Cache an object expressed in JSON or var_export() format.Ĭore-config (conf, Edit drushrc, site alias, and Drupal settings.php files.Ĭore-cron (cron) Run all cron hooks in all active modules for specified site.Ĭore-execute (exec, Execute a shell command. v, -verbose Display extra information about the command. l, URI of the drupal site to use (only needed in multisite environments or when running on an alternate port). s, -simulate Simulate all relevant actions (don't actually change the system). r, -root= Drupal root directory to use (default: current directory). n, -no Assume 'no' as answer to all prompts. d, -debug Display even more information, including internal messages. Global options (see `drush topic core-global-options` for the full list): Run `drush topic` to read even more documentation. Run `drush help ` to view command-specific help. You should see this: Execute a drush command. Ln -s $HOME/bin/drush-master/drush $HOME/bin/drush Meet DrushĪfter you download and install the Drush software, you can open your Terminal/Console application, type drush, and hit ENTER. # Install Drush dependencies with Composer (assumes `composer` is on system PATH) When you're ready to manually install Drush: # Create a bin directory for your user account and add to system path You can also manually download and install Drush, but you must have Composer already installed first. sed -i '1i export PATH="$HOME/.composer/vendor/bin:$PATH"' $HOME/.bashrc Manually You'll also want to make sure the Composer binaries directory is added to your system path. If you have Composer installed on your system, you can use it to install Drush. Keep in mind your operating system's package manager may install an older version.įor Ubuntu/Debian: sudo apt-get install drushįor OS X with Homebrew: brew install drush With Composer If you are running Linux, you can most likely install Drush with the operating system's native package manager. You have to download and install the Drush command-line software. An efficient Drupal 7 developer must use Drush. Simply put, you can perform administrative tasks far more efficiently with Drush than you can with the Drupal administration control panel in the web browser. You can use Drush to download Drupal, install Drupal using a default or custom install profile, manage Drupal modules, sync a local Drupal website with remote staging and production servers, and lots more. What is Drush?ĭrush is "a command line shell and scripting interface for Drupal." It is short for Drupal Shell. Since we serve a number of clients as a Drupal web design firm, these posts are meant to share some of our tips for how we effectively and efficiently build out sites for clients. This is the first article in New Media Campaigns' blog series on learning Drush with Drupal 7.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |