Saturday, March 30, 2013

Drush Commands

Core drush commands

archive-dumpBackup your code, files, and database into a single file.
archive-restoreExpand a site archive into a Drupal web site.
cache-clearClear a specific cache, or all drupal caches.
cache-getFetch a cached object and display it.
cache-setCache an object expressed in JSON or var_export() format.
core-configEdit drushrc, site alias, and Drupal settings.php files.
core-cronRun all cron hooks in all active modules for specified site.
core-executeExecute a shell command. Usually used with a site alias.
core-quick-drupalDownload, install, serve and login to Drupal with minimal configuration and dependencies.
core-requirementsProvides information about things that may be wrong in your Drupal installation, if any.
core-rsyncRsync the Drupal tree to/from another server using ssh.
core-statusProvides a birds-eye view of the current Drupal installation, if any.
core-topicRead detailed documentation on a given topic.
drupal-directoryReturn path to a given module/theme directory.
helpPrint this help message. See `drush help help` for more options.
image-flushFlush all derived images for a given style.
php-evalEvaluate arbitrary php code after bootstrapping Drupal (if available).
php-scriptRun php script(s).
queue-listReturns a list of all defined queues
queue-runRun a specific queue by name
search-indexIndex the remaining search items without wiping the index.
search-reindexForce the search index to be rebuilt.
search-statusShow how many items remain to be indexed out of the total.
self-updateCheck to see if there is a newer Drush release available.
shell-aliasPrint all known shell alias records.
site-aliasPrint site alias records for all known site aliases and local sites.
site-installInstall Drupal along with modules/themes/configuration using the specified install profile.
site-resetReset a persistently set site.
site-setSet a site alias to work on that will persist for the current session.
site-sshConnect to a Drupal site's server via SSH for an interactive session or to run a shell command
test-cleanClean temporary tables and files.
test-runRun tests. Note that you must use the --uri option.
updatedbApply any database updates required (as with running update.php).
usage-sendSend anonymous Drush usage information to statistics logging site. Usage statistics contain the Drush command name and the Drush option names, but no arguments or option values.
usage-showShow Drush usage information that has been logged but not sent. Usage statistics contain the Drush command name and the Drush option names, but no arguments or option values.
variable-deleteDelete a variable.
variable-getGet a list of some or all site variables and values.
variable-setSet a variable.
versionShow drush version.
watchdog-deleteDelete watchdog messages.
watchdog-listShow available message types and severity levels. A prompt will ask for a choice to show watchdog messages.
watchdog-showShow watchdog messages.

Runserver commands

runserverRuns a lightweight built in http server for development.

Field commands

field-cloneClone a field and all its instances.
field-createCreate fields and instances. Returns urls for field editing.
field-deleteDelete a field and its instances.
field-infoView information about fields, field_types, and widgets.
field-updateReturn URL for field editing web page.

Project manager commands

pm-disableDisable one or more extensions (modules or themes).
pm-downloadDownload projects from drupal.org or other sources.
pm-enableEnable one or more extensions (modules or themes).
pm-infoShow detailed info for one or more extensions (modules or themes).
pm-listShow a list of available extensions (modules and themes).
pm-refreshRefresh update status information.
pm-releasenotesPrint release notes for given projects.
pm-releasesPrint release information for given projects.
pm-uninstallUninstall one or more modules.
pm-updateUpdate Drupal core and contrib projects and apply any pending database updates (Same as pm-updatecode + updatedb).
pm-updatecodeUpdate Drupal core and contrib projects to latest recommended releases.

SQL commands

sql-cliOpen a SQL command-line interface using Drupal's credentials.
sql-connectA string for connecting to the DB.
sql-createCreate a database.
sql-dropDrop all tables in a given database.
sql-dumpExports the Drupal DB as SQL using mysqldump or equivalent.
sql-queryExecute a query against the site database.
sql-syncCopy and import source database to target database. Transfers via rsync.

User commands

user-add-roleAdd a role to the specified user accounts.
user-blockBlock the specified user(s).
user-cancelCancel a user account with the specified name.
user-createCreate a user account with the specified name.
user-informationPrint information about the specified user(s).
user-loginDisplay a one time login link for the given user account (defaults to uid 1).
user-password(Re)Set the password for the user account with the specified name.
user-remove-roleRemove a role from the specified user accounts.
user-unblockUnblock the specified user(s).

Other commands

makeTurns a makefile into a working Drupal codebase.
make-generateGenerate a makefile from the current Drupal site.

Global Options (see `drush topic core-global-options` for the full list)

-r <path>, --root=<path> Drupal root directory to use (default: current directory).
-l <http://example.com:8888>, --uri=<http://example.com:8888> URI of the drupal site to use (only needed in multisite environments or when running on an alternate port).
-v, --verbose Display extra information about the command.
-d, --debug Display even more information, including internal messages.
-y, --yes Assume 'yes' as answer to all prompts.
-n, --no Assume 'no' as answer to all prompts.
-s, --simulate Simulate all relevant actions (don't actually change the system).
-p, --pipe Emit a compact representation of the command for scripting.
-h, --help This help system.
--version Show drush version.
--php=</path/to/file> The absolute path to your PHP intepreter, if not 'php' in the path.
-ia, --interactive Force interactive mode for commands run on multiple targets (e.g. `drush @site1,@site2 cc --ia`).


10 comments:

  1. There are numerous hosting solutions available in the market but few are acquiescent for development environment in comparison to Drupal hosting. Drupal hosting had humble origins and started out as a message board but due to its ease of use and user friendly features it garnered the attention of developers community.

    http://www.cloudways.com/en/drupal-cloud-hosting.php

    ReplyDelete
  2. Thanks for sharing such a nice information, its helpful for me. I have you bookmarked to check out new stuff you post.
    Keep sharing.
    CMS Development US

    ReplyDelete
  3. Hi...

    Thanks for this commands which you shared in your Post. Its very Useful for me. Here i got every drupal command because i am also customised content management solutions with expertise in Drupal open source technology for easy-to-manage CMS applications.

    ReplyDelete
  4. Nice Posting! because there are a lot of informative postings so, thanks a lot for sharing the information. Ecommerce website Designing in Mumbai || Ecommerce Solution || Ecommerce Solution in Mumbai

    ReplyDelete
  5. Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me. Dynamic Website Designing || Dynamic website Designing in Mumbai || Ecommerce website Designing

    ReplyDelete
  6. Thanks for nice post. It is complicated to me now, but in typical, the efficiency and significance is annoying. Very much thanks again and best of luck! Thanks for sharing. Website Maintenance in Mumbai || Website Development || Website Development in Mumbai

    ReplyDelete
  7. Excellent post, I agree with you 100%! I’m always scouring the Internet for new information and learning whatever I can, and in doing so I sometimes leave comments on blogs. Web Designing || Web Designing in Mumbai || Website Maintenance

    ReplyDelete
  8. It was very useful for me. Keep sharing such ideas in the future as well. This was actually what I was looking for, and I am glad to came here! Thanks for sharing the such information with us. CMS Website Design || CMS Website Developer || CMS website development company

    ReplyDelete
  9. If you are looking for a company that offers offers an extensive range of services like web application development, website designing, e-commerce solutions etc,Jaintechnosoft will be the key.
    Drupal Web Developers in Bangalore|Website Design Company

    ReplyDelete

only show translated menu items into current language (Drupal 8)

function MY_THEME_preprocess_menu(&$variables) {   if ($variables['menu_name'] == 'brancott-header-menu') {    $langu...