![]() Turns out that drush has a single command that does everything for you! As a bonus, there's a second command that does a full site archive (code, database, and files) that you can restore from if anything goes wrong! ![]() $ drush config-set system.theme admin bootstrap Update Drupal Core + Contrib ModulesĪlways keeping core and contrib modules up-to-date is the most tedious admin task I know. $ drush config-set system.theme default bootstrap # Set the theme to be the "default one" or the "admin one" $ drush sql-cli Appearance" to set it. But after you see how easy it is with drush, you'll never do it any other way. ![]() # Delete all data in your database (MAKE SURE YOU TRUST YOUR BACKUP!) Depending on the site structure and data, the difference can result in up to a 70% reduction on the SQL dump file size. As a good practice, always clear the caches first, to keep the size of the database "dump file" to a minimum. The fastest way to backup your site data is doing a database dump. Keep in mind, every drush command accepts a "-y" argument to skip all yes/no confirmations. With more than 13,000+ Drupal 7 & 8 contrib modules at, the odds that you're not using any of them are pretty slim! Fortunately, drush makes it easy to install modules from using the following commands:īecause smart themers are also lazy, they'll be happy to hear that you can do both the download and enabling in a single command: In my personal experience, you may need to clear Drupal Caches between 5 - 15 times a day. info file's structure, you will always need a fast Cache clear. Whether you are loading new template files, adding new libraries or editing your main theme. Without further ado, let's dive into my favourite commands, with both D7 and D8 versions where appropriate. Fortunately, Acquia Dev Desktop, Pantheon.io, Drupal VM, and standard dev environments all come with drush pre-installed. If you have more of them that you use regularly, please put them in the comments, as I would love to add them to the list.Īs a requirement for executing all of the following commands, you must first ensure that you have Drush installed for your Drupal development environment. In this article, I'll list the Drush commands I use every day in my Drupal theme development and site-building process. You might think that using the drush command-line tool is only something hardcore developers do, but it turns out it's super-helpful for site builders and theme developers too! In my experience, using drush will speed up the usual Drupal Admin tasks 3 to 10 times, compared with visiting the Drupal admin pages in the browser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |