Drupal/cheatsheet: Difference between revisions

From Freephile Wiki
m added Category:Drupal using HotCat
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight"
 
Line 3: Line 3:


Take site offline
Take site offline
<source lang='bash'>
<syntaxhighlight lang='bash'>
drush vset maintenance_mode 1
drush vset maintenance_mode 1
</source>
</syntaxhighlight>


get a status and use <code>--debug</code> to get a bit more info about what drush is doing
get a status and use <code>--debug</code> to get a bit more info about what drush is doing
<source lang='bash'>
<syntaxhighlight lang='bash'>
drush --debug status
drush --debug status
</source>
</syntaxhighlight>


Check system requirements
Check system requirements
<source lang='bash'>
<syntaxhighlight lang='bash'>
drush rq
drush rq
</source>
</syntaxhighlight>


Clear all caches and then run database updates
Clear all caches and then run database updates
<source lang='bash'>
<syntaxhighlight lang='bash'>
drush cc all
drush cc all
drush --debug updb
drush --debug updb


</source>
</syntaxhighlight>




List all the enabled modules (and themes).  Add the <code>--pipe -p</code> option for compact output
List all the enabled modules (and themes).  Add the <code>--pipe -p</code> option for compact output
<source lang='bash'>
<syntaxhighlight lang='bash'>
drush pml --status=enabled
drush pml --status=enabled
</source>
</syntaxhighlight>


Disable a bunch of stuff all at once (and let Drupal figure out the dependencies that also need to be disabled.)
Disable a bunch of stuff all at once (and let Drupal figure out the dependencies that also need to be disabled.)
<source lang="bash">
<syntaxhighlight lang="bash">
drush dis admin_menu,backstretch,ctools,features,mollom,seo_checker,socialmedia,token,xmlsitemap
drush dis admin_menu,backstretch,ctools,features,mollom,seo_checker,socialmedia,token,xmlsitemap
</source>
</syntaxhighlight>


[[Category:Drupal]]
[[Category:Drupal]]

Latest revision as of 13:24, 24 February 2025

My current (as of 2025-09-22) setup is Static/CGI/PHP-5.4


Take site offline

drush vset maintenance_mode 1

get a status and use --debug to get a bit more info about what drush is doing

drush --debug status

Check system requirements

drush rq

Clear all caches and then run database updates

drush cc all
drush --debug updb


List all the enabled modules (and themes). Add the --pipe -p option for compact output

drush pml --status=enabled

Disable a bunch of stuff all at once (and let Drupal figure out the dependencies that also need to be disabled.)

drush dis admin_menu,backstretch,ctools,features,mollom,seo_checker,socialmedia,token,xmlsitemap