跳转到主要内容
你行网

Main navigation

  • 首页
  • Drupal
  • 编程与开发
  • 数据库
  • 操作系统与应用
  • 服务器与运维
  • 社区
User account menu
  • 登录

面包屑

  1. 首页

drush 命令帮助

由 hrs, 8 七月, 2020

Execute a drush command. Run `drush help [command]` to view command-specific help.  Run `drush topic` to read even more documentation.

Global options (see `drush topic core-global-options` for the full list):
 -d, --debug                               Display even more information, including internal messages.                                                 
 -h, --help                                This help system.                                                                                           
 -n, --no                                  Assume 'no' as answer to all prompts.                                                                       
 -r <path>, --root=<path>                  Drupal root directory to use (default: current directory).                                                  
 -s, --simulate                            Simulate all relevant actions (don't actually change the system).                                           
 -l <http://example.com:8888>,             URI of the drupal site to use (only needed in multisite environments or when running on an alternate port). 
 --uri=<http://example.com:8888>                                                                                                                       
 -v, --verbose                             Display extra information about the command.                                                                
 -y, --yes                                 Assume 'yes' as answer to all prompts.

Core Drush commands: (core)

Drush 核心命令(核心)
 archive-dump (ard,    Backup your code, files, and database into a single file.                                 
 archive-backup, arb,                                                                                                 
 archive:dump)                                                                                                        
 archive-restore       Expand a site archive into a Drupal web site.                                                  
 (arr,                                                                                                                
 archive:restore)                                                                                                     
 core-cli (php,        Open an interactive shell on a Drupal site.                                                    
 core:cli)                                                                                                            
 core-config (conf,    Edit drushrc, site alias, and Drupal settings.php files.                                       
 config, core:config)                                                                                                 
 core-cron (cron,      Run all cron hooks in all active modules for specified site.                                   
 core:cron)                                                                                                           
 core-execute (exec,   Execute a shell command. Usually used with a site alias.                                       
 execute,                                                                                                             
 core:execute)                                                                                                        
 core-init (init,      Enrich the bash startup file with completion and aliases. Copy .drushrc file to ~/.drush       
 core:init)                                                                                                           
 core-quick-drupal     Download, install, serve and login to Drupal with minimal configuration and dependencies.      
 (qd, cutie,                                                                                                          
 core:quick:drupal)                                                                                                   
 core-requirements     Provides information about things that may be wrong in your Drupal installation, if any.       
 (status-report, rq,                                                                                                  
 core:requirements)                                                                                                   
 core-rsync (rsync,    Rsync the Drupal tree to/from another server using ssh.                                        
 core:rsync)                                                                                                          
 core-status (status,  Provides a birds-eye view of the current Drupal installation, if any.                          
 st, core:status)                                                                                                     
 core-topic (topic,    Read detailed documentation on a given topic.                                                  
 core:topic)                                                                                                          
 do:sanitize           Performs database sanitization.                                                                
 (do-sanitize)                                                                                                        
 drupal-directory      Return the filesystem path for modules/themes and other key folders.                           
 (dd,                                                                                                                 
 drupal:directory)                                                                                                    
 entity-updates        Apply pending entity schema updates.                                                           
 (entup,                                                                                                              
 entity:updates)                                                                                                      
 help                  Print this help message. See `drush help help` for more options.                               
 image-derive (id,     Create an image derivative.                                                                    
 image:derive)                                                                                                        
 image-flush (if,      Flush all derived images for a given style.                                                    
 image:flush)                                                                                                         
 new-status                                                                                                           
 php-eval (eval, ev,   Evaluate arbitrary php code after bootstrapping Drupal (if available).                         
 php:eval)                                                                                                            
 php-script (scr,      Run php script(s).                                                                             
 php:script)                                                                                                          
 queue-list            Returns a list of all defined queues                                                           
 queue-run             Run a specific queue by name                                                                   
 (queue:run)                                                                                                          
 sanitize:comments     Sanitizes comments_field_data table.                                                           
 (sanitize-comments)                                                                                                  
 sanitize:sessions     Truncates the session table.                                                                   
 (sanitize-sessions)                                                                                                  
 sanitize:table-colum  Replaces all values in given table column with the specified value.                            
 n                                                                                                                    
 (sanitize-table-colu                                                                                                 
 mn)                                                                                                                  
 sanitize:user-fields  Sanitize string fields associated with the user.                                               
 (sanitize-user-field                                                                                                 
 s)                                                                                                                   
 shell-alias (sha,     Print all known shell alias records.                                                           
 shell:alias)                                                                                                         
 site-alias (sa,       Print site alias records for all known site aliases and local sites.                           
 site:alias)                                                                                                          
 site-install (si,     Install Drupal along with modules/themes/configuration using the specified install profile.    
 site:install)                                                                                                        
 site-set (use,        Set a site alias to work on that will persist for the current session.                         
 site:set)                                                                                                            
 site-ssh (ssh,        Connect to a Drupal site's server via SSH for an interactive session or to run a shell command 
 site:ssh)                                                                                                            
 sql-sanitize          Run sanitization operations on the current database.                                           
 (sqlsan)                                                                                                             
 twig-compile (twigc,  Compile all Twig template(s).                                                                  
 twig:compile)                                                                                                        
 updatedb (updb)       Apply any database updates required (as with running update.php).                              
 updatedb-status       List any pending database updates.                                                             
 (updbst,                                                                                                             
 updatedb:status)                                                                                                     
 variable-delete       Delete a variable.                                                                             
 (vdel,                                                                                                               
 variable:delete)                                                                                                     
 variable-get (vget,   Get a list of some or all site variables and values.                                           
 variable:get)                                                                                                        
 variable-set (vset,   Set a variable.                                                                                
 variable:set)                                                                                                        
 version               Show drush version.                                                                            
 wrap:table-name       Wraps a table name in brackets if a database prefix is being used.                             
 (wrap-table-name)
Cache commands: (cache)
 cache-clear (cc,    Clear a specific cache, or all drupal caches.             
 cache:clear)                                                                  
 cache-get (cg,      Fetch a cached object and display it.                     
 cache:get)                                                                    
 cache-rebuild (cr,  Rebuild a Drupal 8 site and clear all its caches.         
 rebuild,                                                                      
 cache:rebuild)                                                                
 cache-set (cs,      Cache an object expressed in JSON or var_export() format. 
 cache:set)
Config commands: (config)
 config-delete (cdel,  Delete a configuration object.                                                                          
 config:delete)                                                                                                                
 config-edit (cedit,   Open a config file in a text editor. Edits are imported into active configuration after closing editor. 
 config:edit)                                                                                                                  
 config-export (cex,   Export configuration to a directory.                                                                    
 config:export)                                                                                                                
 config-get (cget,     Display a config value, or a whole configuration object.                                                
 config:get)                                                                                                                   
 config-import (cim,   Import config from a config directory.                                                                  
 config:import)                                                                                                                
 config-list (cli,     List config names by prefix.                                                                            
 config:list)                                                                                                                  
 config-pull (cpull,   Export and transfer config from one environment to another.                                             
 config:pull)                                                                                                                  
 config-set (cset,     Set config value directly. Does not perform a config import.                                            
 config:set)
Field commands: (field)
 field-clone           Clone a field and all its instances.                         
 (field:clone)                                                                      
 field-create          Create fields and instances. Returns urls for field editing. 
 (field:create)                                                                     
 field-delete          Delete a field and its instances.                            
 (field:delete)                                                                     
 field-info            View information about fields, field_types, and widgets.     
 field-update          Return URL for field editing web page.                       
 (field:update)
Make commands: (make)
 make                  Turns a makefile into a working Drupal codebase.                                                                  
 make-convert          Convert a legacy makefile into another format. Defaults to converting .make => .make.yml.                         
 make-generate         Generate a makefile from the current Drupal site.                                                                 
 (generate-makefile)                                                                                                                     
 make-lock             Process a makefile and outputs an equivalent makefile with projects version *resolved*. Respects pinned versions. 
 make-update           Process a makefile and outputs an equivalent makefile with projects version resolved to latest available.
Project manager commands: (pm)
 pm-disable (dis,     Disable one or more extensions (modules or themes).                                                                
 pm:disable)                                                                                                                             
 pm-download (dl,     Download projects from drupal.org or other sources.                                                                
 pm:download)                                                                                                                            
 pm-enable (en,       Enable one or more extensions (modules or themes).                                                                 
 pm:enable)                                                                                                                              
 pm-info (pmi,        Show detailed info for one or more extensions (modules or themes).                                                 
 pm:info)                                                                                                                                
 pm-list (pml,        Show a list of available extensions (modules and themes).                                                          
 pm:list)                                                                                                                                
 pm-projectinfo       Show a report of available projects and their extensions.                                                          
 (pmpi,                                                                                                                                  
 pm:projectinfo)                                                                                                                         
 pm-refresh (rf,      Refresh update status information.                                                                                 
 pm:refresh)                                                                                                                             
 pm-releasenotes      Print release notes for given projects.                                                                            
 (rln,                                                                                                                                   
 pm:releasenotes)                                                                                                                        
 pm-releases (rl,     Print release information for given projects.                                                                      
 pm:releases)                                                                                                                            
 pm-uninstall (pmu,   Uninstall one or more modules and their dependent modules.                                                         
 pm:uninstall)                                                                                                                           
 pm-update (up,       Update Drupal core and contrib projects and apply any pending database updates (Same as pm-updatecode + updatedb). 
 pm:update)                                                                                                                              
 pm-updatecode (upc,  Update Drupal core and contrib projects to latest recommended releases.                                            
 pm:updatecode)                                                                                                                          
 pm-updatestatus      Show a report of available minor updates to Drupal core and contrib projects.                                      
 (ups,                                                                                                                                   
 pm:updatestatus)
Role commands: (role)
 role-add-perm (rap,  Grant specified permission(s) to a role.                                                                                                                                         
 role:add:perm)                                                                                                                                                                                        
 role-create (rcrt,   Create a new role.                                                                                                                                                               
 role:create)                                                                                                                                                                                          
 role-delete (rdel,   Delete a role.                                                                                                                                                                   
 role:delete)                                                                                                                                                                                          
 role-list (rls,      Display a list of all roles defined on the system.  If a role name is provided as an argument, then all of the permissions of that role will be listed.  If a permission name is 
 role:list)           provided as an option, then all of the roles that have been granted that permission will be listed.                                                                              
 role-remove-perm     Remove specified permission(s) from a role.                                                                                                                                      
 (rmp,                                                                                                                                                                                                 
 role:remove:perm)
Runserver commands: (runserver)
 runserver (rs)        Runs PHP's built-in http server for development.
SQL commands: (sql)
 sql-cli (sqlc,        Open a SQL command-line interface using Drupal's credentials.                                            
 sql:cli)                                                                                                                       
 sql-connect           A string for connecting to the DB.                                                                       
 (sql:connect)                                                                                                                  
 sql-create            Create a database.                                                                                       
 (sql:create)                                                                                                                   
 sql-drop (sql:drop)   Drop all tables in a given database.                                                                     
 sql-dump (sql:dump)   Exports the Drupal DB as SQL using mysqldump or equivalent.                                              
 sql-query (sqlq,      Execute a query against a database.                                                                      
 sql:query)                                                                                                                     
 sql-sync              Copies the database contents from a source site to a target site. Transfers the database dump via rsync.
Search commands: (search)
 search-index          Index the remaining search items without wiping the index. 
 search-reindex        Force the search index to be rebuilt.                      
 (search:index)                                                                   
 search-status         Show how many items remain to be indexed out of the total.
State commands: (state)
 state-delete (sdel,  Delete a state value.  
 state:delete)                               
 state-get (sget,     Display a state value. 
 state:get)                                  
 state-set (sset,     Set a state value.     
 state:set)
User commands: (user)
 user-add-role (urol,  Add a role to the specified user accounts.                                    
 user:add:role)                                                                                      
 user-block (ublk,     Block the specified user(s).                                                  
 user:block)                                                                                         
 user-cancel (ucan,    Cancel a user account with the specified name.                                
 user:cancel)                                                                                        
 user-create (ucrt,    Create a user account with the specified name.                                
 user:create)                                                                                        
 user-information      Print information about the specified user(s).                                
 (uinf,                                                                                              
 user:information)                                                                                   
 user-login (uli,      Display a one time login link for the given user account (defaults to uid 1). 
 user:login)                                                                                         
 user-password (upwd,  (Re)Set the password for the user account with the specified name.            
 user:password)                                                                                      
 user-remove-role      Remove a role from the specified user accounts.                               
 (urrol,                                                                                             
 user:remove:role)                                                                                   
 user-unblock (uublk,  Unblock the specified user(s).                                                
 user:unblock)
Views commands: (views)
 views-analyze (va,    Get a list of all Views analyze warnings                  
 views:analyze)                                                                  
 views-dev (vd,        Set the Views settings to more developer-oriented values. 
 views:dev)                                                                      
 views-disable (vdis,  Disable the specified views.                              
 views:disable)                                                                  
 views-enable (ven,    Enable the specified views.                               
 views:enable)                                                                   
 views-execute (vex,   Execute a view and get the results.                       
 views:execute)                                                                  
 views-list (vl,       Get a list of all views in the system.                    
 views:list)
Watchdog commands: (watchdog)
 watchdog-delete      Delete watchdog messages.                                                                                   
 (wd-del, wd-delete,                                                                                                              
 watchdog:delete)                                                                                                                 
 watchdog-list        Show available message types and severity levels. A prompt will ask for a choice to show watchdog messages. 
 (wd-list,                                                                                                                        
 watchdog:list)                                                                                                                   
 watchdog-show        Show watchdog messages.                                                                                     
 (wd-show, ws,                                                                                                                    
 watchdog:show)
界面翻译: (locale)
 locale-check          Checks for available translation updates. 
 locale-update         Updates the available translations.       
 (locale:check)
All commands in search_api: (search_api)
 search-api-clear      Clear one or all search indexes and mark them for reindexing.                        
 (sapi-c)                                                                                                   
 search-api-disable    Disable one or more enabled search indexes.                                          
 (sapi-dis)                                                                                                 
 search-api-disable-a  Disable all enabled search indexes.                                                  
 ll (sapi-disa)                                                                                             
 search-api-enable     Enable one or more disabled search indexes.                                          
 (sapi-en)                                                                                                  
 search-api-enable-al  Enable all disabled search indexes.                                                  
 l (sapi-ena)                                                                                               
 search-api-index      Index items for one or all enabled search indexes.                                   
 (sapi-i)                                                                                                   
 search-api-list       列出全部搜索索引。                                                                   
 (sapi-l)                                                                                                   
 search-api-reset-tra  Force reindexing of one or all search indexes, without deleting existing index data. 
 cker                                                                                                       
 (search-api-mark-all                                                                                       
 ,                                                                                                          
 search-api-reindex,                                                                                        
 sapi-r)                                                                                                    
 search-api-search     Search for a keyword or phrase in a given index.                                     
 (sapi-search)                                                                                              
 search-api-server-cl  Clear all search indexes on the search server and mark them for reindexing.          
 ear (sapi-sc)                                                                                              
 search-api-server-di  Disable a search server.                                                             
 sable (sapi-sd)                                                                                            
 search-api-server-en  Enable a search server.                                                              
 able (sapi-se)                                                                                             
 search-api-server-li  List all search servers.                                                             
 st (sapi-sl)                                                                                               
 search-api-set-index  Set the search server used by a given index.                                         
 -server (sapi-sis)                                                                                         
 search-api-status     Show the status of one or all search indexes.                                        
 (sapi-s)
All commands in views_slideshow_cycle: (views_slideshow_cycle)
 views-slideshow-cycl  Download and install the jQuery Cycle library.                                 
 e-cycle (dl-cycle)                                                                                   
 views-slideshow-cycl  Download and install the jquery.hoverIntent library.                           
 e-hoverintent                                                                                        
 (dl-hoverintent)                                                                                     
 views-slideshow-cycl  Download and install the JSON2 library.                                        
 e-json2 (dl-json2)                                                                                   
 views-slideshow-cycl  Download and install the jQuery Cycle, jQuery hoverIntent and JSON2 libraries. 
 e-lib (dl-cycle-lib)                                                                                 
 views-slideshow-cycl  Download and install the jQuery.pause library.                                 
 e-pause (dl-pause)
Other commands: (simple_sitemap)
 simple-sitemap-gener  Regenerate all XML sitemap variants or continue generation. 
 ate (ssg)                                                                         
 simple-sitemap-rebui  Queue all sitemap variants for regeneration.                
 ld-queue (ssr)

  • 登录或注册以发表评论
内容类型分类
技术文章
文章归类
操作系统与运用

文章标签

  • drush

评论

文章标签

Excel
CSS
ubuntu
php
vim
五笔
VPN
Linux
command
HTML
drupal 8
drupal 7
centos
composer
Mysql
模块(module)
drush
Drupal
JavaSrcipt
apache
英语
drupal 9
nerdtree
荔壳风
network
果树种植
surround
drupal10
SEO
主题(theme)
更多

相关文章

  • 因权限问题导致drupal cms 无法正常安装,那么该如何解决这个问题
  • kvm虚拟机启动失败:default网络未激活
  • ubuntu 安装kvm 虚拟机
  • foreach 是 PHP 循环语句使用方法
  • implode() 函数的定义和用法
  • Drupal 11 主题制作教程
  • 检查 Composer 是否为官方源
  • 在 Drupal 中权重(Weight)是怎样排序的
  • 解决 Drupal 主题缺失问题
  • 为什么学习php 会一边学,一边忘
RSS源

友情链接 网站地图 版权信息 联系我们 网址导航 社区

Copyright © 2019 - 2021 你行网 版权所有  粤ICP备19072650号