Drush (от Drupal shell) — утилита с интерфейсом командной строки, созданная для управления и администрирования Drupal сайтов, доступна как и для Linux, Unix, Mac OS X, так и для Windows систем. Drush используется многими разработчиками, например, для скачивания/установки/удаления модулей, установки сайтов на Drupal, применении обновлений модулей в базе данных, бэкапа сайта и многого другого.

Drush позволяет очень сильно сэкономить время, когда нужно выполнить типичные задачи или автоматизировать часто выполняемые действия. Например, бэкап сайта, очистка кэша, восстановление сайта из бэкапа. Для того, чтобы пользоваться Drush - его сначала нужно установить. Итак, приступим.

Установка Drush

Mac OS X, Linux

Вариант 1
В терминале вводим:

git clone https://github.com/drush-ops/drush
sudo mv drush /usr/local/lib/
sudo chmod u+x /usr/local/lib/drush/drush
sudo ln -s /usr/local/lib/drush/drush /usr/bin/drush

Вариант 2 (Используя PEAR)
Если модуль console_getopt не установлен, установим его:

pear install Console_Getopt

Если он уже установлен, то просто вводим в терминале следующие команды:

>pear upgrade --force Console_Getopt
>pear upgrade --force pear
>pear upgrade-all
>pear channel-discover pear.drush.org
>pear install drush/drush

Windows

Для установки Drush под Windows проще всего воспользоваться установщиком. Переходим сюда и кликаем по ссылке Download Drush 6.0 Windows Installer. Запускаем скаченный DrushSetup.msi с правами Администратора, кликаем Next, выбираем необходимые компоненты и нажимаем Install.

Как пользоваться Drush

Я думаю, что большинство разработчиков знает куда вводить команды Drush, но на всякий случай все-таки уточню. Все команды вводятся в терминале. Это может быть командная строка сервера к которому Вы подключились, или командный интерфейс вашей локальной операционной системы, где установлен Drupal. Перед тем как вводить Drush команды, нужно перейти в корневую директорию установленного Drupal.

Команды Drush

Вывод справочной информации

drush help
выводит справку по командам Drush.

drush help [имя команды]
Справка по конкретной команде Drush.

Информация о сайте

drush status
Выведет информацию о Вашем Drupal сайте.

drush --uri=http://mysite.com status
drush -l http://mysite.com status

Аналогично drush status, но для мультисайтинка, где вместо http://mysite.com подставляете URL своего сайта.

drush -r /home/user/sites/drupal status
drush -root=/home/user/sites/drupal status

Выводит информацию о сайте, корневая директория которого находиться в /home/user/sites/drupal

drush sm
drush pm-list

Выводит информацию о всех модулях и темах Drupal сайта.

drush pm-info [имя_модуля]
Выводит информацию о конкретном модуле.

drush pm-releases
Возвращает информацию о версиях модулей и тем.

drush pm-releases [имя модуля или темы]
Возвращает информацию о версиях модуля или темы.

Установка. Удаление. Обновление

drush dl [имя модуля или темы]
Скачивание модуля или темы.

drush en [имя модуля или темы]
Установка скаченного модуля или темы.

drush dis [имя модуля или темы]
Отключение модуля или темы.

drush up [имя модуля или темы]
Обновление модуля или темы.

drush pm-update projects drupal-6.28
Обновление Drupal до указанной версии.

drush pm-uninstall [имя модуля или темы]
Удаление модуля или темы.

Установка Drupal.

В терминале вводим:

drush dl drupal-7
mv drupal-7/ drupal
cd drupal

Далее вводим одну из двух строк:
drush site-install standard --db-url=mysql://[user]:[pass]@localhost/[dbname] --site-name=[sitename]
или:
drush site-install --account-name=admin --account-pass=admin --db-su=root --db-su-pw=root --db-url=mysql://root:root@localhost/drupal-site --site-name=drupal-site

Для Drupal 8 вместо drush dl drupal-7 нужно использовать одну из следующих команд:
drush dl drupal-8 --select
drush dl --default-major=8 --select

Обслуживание сайта

drush cc
Очистка кэша(сокращение от cache-clear. После ввода команды будет предложено какой кэш нужно очистить.

drush cc all
Очистка всех кэшей

drush core-cron
Запуск крона.

BackUp

drush sql-conf
Вывод информации о базе данных Drupal.

drush sql-dump --skip-tables-key=common | gzip > ~/mysite.sql.gz
Дамп базы данных в файл mysite.sql.gz, который будет создан в домашней директории.

gunzip < ~/mysite.sql.gz | `drush sql-connect`
Восстановление базы данных из файла mysite.sql.gz, который находится в домашней директории.

Полный BackUp Сайта

Для бекапа сайта нужно выполнить следующую команду:

drush -r ~/domains/имя_домена ard --destination=/home/`whoami`/backup/`date +%Y%m%d`/имя_файла.tar.gz

Эта команда создаст каталог backup в Вашем домашнем каталоге, после внутри его создаст каталог с текущей датой и в него положит архив сайта путь к которому указан в команде.
В случае если Вы используете мультисайтинг то можно указать следующую команду, для создания бекапа конкретного сайта мультисайтинга:

drush -r ~/domains/имя_домена/sites/корень_сайта_мультисайтинга ard --destination=/home/`whoami`/backup/`date +%Y%m%d`/имя_файла_бекапа.tar.gz

Внутри созданного архива будут хранится файлы Вашего сайта в каталоге c именем сайта и файл дампа БД в sql формате.

P.S.

Выше я описал основные команды проекта, и этот список конечно-же не полный. Если Вы считаете, что нужно добавить какую-то команду, просто напишите об этом в
комментариях статьи. Ознакомиться с полным перечнем команд, и найти другую полезную информацию по Drush Вы можете на странице проекта Drush.

Comments

Besides making the ads compelling, you have to also post your ads frequently to produce this lead-generation strategy work. Submit searching for "coins" with all the search bar at the very best of the "Collectibles" page. search craigslist nationwide using google Craigslist is often a website where it is possible to post advertisements free. The utilization of acronyms in classified ads is usually a carryover from paid print advertising.

Besides making the ads compelling, you have to also post your ads frequently to produce this lead-generation strategy work. Submit searching for "coins" with all the search bar at the very best of the "Collectibles" page. search craigslist nationwide using google Craigslist is often a website where it is possible to post advertisements free. The utilization of acronyms in classified ads is usually a carryover from paid print advertising.

Screen prospects carefully to minimize on showings -- , nor show the rental alone. However, every ad has to be uniquely different being accepted instead of break the Craigslist relation to service. craigslist all states Not all websites support using ASCII letters, but Craigslist does. According to Craigslist, 99 percent of scam attempts for the site could be avoided should you deal simply with local sellers.

Screen prospects carefully to minimize on showings -- , nor show the rental alone. However, every ad has to be uniquely different being accepted instead of break the Craigslist relation to service. craigslist all states Not all websites support using ASCII letters, but Craigslist does. According to Craigslist, 99 percent of scam attempts for the site could be avoided should you deal simply with local sellers.

Shopping online shouldn't think that wading through alphabet soup. Inform buyers more information that will assist them end up buying your toys instead from the others. craigslist advanced search Double-look at your links and tags to make certain they are correct before your submit the ad to Craigslist. You may speak with folks who have jobs, as some people could possibly be looking for first time opportunities while being employed.

Shopping online shouldn't think that wading through alphabet soup. Inform buyers more information that will assist them end up buying your toys instead from the others. craigslist advanced search Double-look at your links and tags to make certain they are correct before your submit the ad to Craigslist. You may speak with folks who have jobs, as some people could possibly be looking for first time opportunities while being employed.

The online information mill crowded, that will make selling your goods challenging. Craigslist is often a large classifieds website that permits you to share advertisements within a variety of sections, including housing, personals and purchases. search all craigslist Make sure every ad you post adheres to Craigslist's regards to use to counteract them from being flagged. Make a number of questions in regards to the post when you call, and that means you don't forget any details you need to know.

The online information mill crowded, that will make selling your goods challenging. Craigslist is often a large classifieds website that permits you to share advertisements within a variety of sections, including housing, personals and purchases. search all craigslist Make sure every ad you post adheres to Craigslist's regards to use to counteract them from being flagged. Make a number of questions in regards to the post when you call, and that means you don't forget any details you need to know.

This little trick could add pizzazz for an otherwise boring advertisement. How to Post Multiple Photos on Craigslist; Print this information; Instructions. craigslist global search If you want to start over, decide to delete the ad. You don’ t need any special software or products to ready your photos for Craiglist.

This little trick could add pizzazz for an otherwise boring advertisement. How to Post Multiple Photos on Craigslist; Print this information; Instructions. craigslist global search If you want to start over, decide to delete the ad. You don’ t need any special software or products to ready your photos for Craiglist.

Whenever it is possible to, will include a clear, well-lit photo inside your Craigslist post. Adding a compelling animated slide show displays your items is one method to capture the interest of Craigslist buyers. craigslist search If the posting is vague regarding its location or duties, it can be a scam. Ad creators typically use PPU to advise readers they prefer that your customers pick up advertised items: “Please Pick Up.

Whenever it is possible to, will include a clear, well-lit photo inside your Craigslist post. Adding a compelling animated slide show displays your items is one method to capture the interest of Craigslist buyers. craigslist search If the posting is vague regarding its location or duties, it can be a scam. Ad creators typically use PPU to advise readers they prefer that your customers pick up advertised items: “Please Pick Up.

viagra online usa http://v1agraonline.com/#9548 - viagra online sales

Some listings might include what the property owner is prepared to consider accepting in exchange with the item. ” You should also observe that Pay - Pal's website is usually preceded inside address bar by "https" which indicates secure socket layer encryption. search all craigslist If you need to make a more eye-catching ad as opposed to standard, text-only Craigslist ad, you'll be able to insert HTML tags to embed objects, create headlines, add bullet points or another content. They don’t care you just used yours on weekends.

Some listings might include what the property owner is prepared to consider accepting in exchange with the item. ” You should also observe that Pay - Pal's website is usually preceded inside address bar by "https" which indicates secure socket layer encryption. search all craigslist If you need to make a more eye-catching ad as opposed to standard, text-only Craigslist ad, you'll be able to insert HTML tags to embed objects, create headlines, add bullet points or another content. They don’t care you just used yours on weekends.

Some listings might include what the property owner is prepared to consider accepting in exchange with the item. ” You should also observe that Pay - Pal's website is usually preceded inside address bar by "https" which indicates secure socket layer encryption. search all craigslist If you need to make a more eye-catching ad as opposed to standard, text-only Craigslist ad, you'll be able to insert HTML tags to embed objects, create headlines, add bullet points or another content. They don’t care you just used yours on weekends.

If, however, you do not use these email clients, you'll discover a pop-up window appearing, with a communication client you don't recognize. I possess a five-inch on-camera monitor that I have available. all craigslist You may later choose to delete your money and create yet another one because someone is harassing you or for another reason. For a high-rise apartment or room for rental, drive from the building and speak with neighbors.

If, however, you do not use these email clients, you'll discover a pop-up window appearing, with a communication client you don't recognize. I possess a five-inch on-camera monitor that I have available. all craigslist You may later choose to delete your money and create yet another one because someone is harassing you or for another reason. For a high-rise apartment or room for rental, drive from the building and speak with neighbors.

Consider flagging if your content is miscategorized---from the wrong category, talking about another ad posted on Craigslist or misplaced in another way. The scammer will request which you wire the protection deposit to him and promise for you an envelope while using apartment's keys stuffed within it when he receives the funds. craiglist apartment search Enter an email to that you just want individuals reply when they are interested with your ad. Open the email from Craigslist, and select the link from the email.

cialis 20 mg cialis 5 mg cialis prices

Consider flagging if your content is miscategorized---from the wrong category, talking about another ad posted on Craigslist or misplaced in another way. The scammer will request which you wire the protection deposit to him and promise for you an envelope while using apartment's keys stuffed within it when he receives the funds. craiglist apartment search Enter an email to that you just want individuals reply when they are interested with your ad. Open the email from Craigslist, and select the link from the email.

The other text box automatically adjusts to an alternative, lower number. This is usually a simple scam carried out by affiliate marketing. all of craigslist Another option should be to open the ad from the Chrome browser, then right select an image inside the ad. Fancy colored text and multi-sized fonts may show up in some Craigslist posts, however, you won't find a lot of ads with colored backgrounds.

The other text box automatically adjusts to an alternative, lower number. This is usually a simple scam carried out by affiliate marketing. all of craigslist Another option should be to open the ad from the Chrome browser, then right select an image inside the ad. Fancy colored text and multi-sized fonts may show up in some Craigslist posts, however, you won't find a lot of ads with colored backgrounds.

This ghosting mechanism, however, often mistakenly ghosts ads for legitimate services and goods. This why knowing tips on how to get an advert noticed on Craigslist is vitally essential to making the most effective out of the valuable website. national craigslist search You will use Craigslist for in excess of just locating a bargain; you can create a lot of money from with it wisely. Track how many page views for a Craigslist ad by.

This ghosting mechanism, however, often mistakenly ghosts ads for legitimate services and goods. This why knowing tips on how to get an advert noticed on Craigslist is vitally essential to making the most effective out of the valuable website. national craigslist search You will use Craigslist for in excess of just locating a bargain; you can create a lot of money from with it wisely. Track how many page views for a Craigslist ad by.

Apparently they're selling their disrespectful irresponsible drinking DWI spoiled barb of the daughter's perfect BMW X3. Select options for instance "type" and "category" about the following screens and soon you reach the posting form. all of craigslist search Choose a category on the many listed and choose the spot closest to you for the next page. the utmost resolution output by standard non-high definition computer.

Apparently they're selling their disrespectful irresponsible drinking DWI spoiled barb of the daughter's perfect BMW X3. Select options for instance "type" and "category" about the following screens and soon you reach the posting form. all of craigslist search Choose a category on the many listed and choose the spot closest to you for the next page. the utmost resolution output by standard non-high definition computer.

There are certain keywords that could trigger ghosting on Craigslist. How to Safely Sublet an Apartment Through Craigslist. craigslist search After reading the agreement, go through the button so you will is going to be asked to look at the email hence the ad will go live. Deleting search history is essential, particularly if you pay bills online.

There are certain keywords that could trigger ghosting on Craigslist. How to Safely Sublet an Apartment Through Craigslist. craigslist search After reading the agreement, go through the button so you will is going to be asked to look at the email hence the ad will go live. Deleting search history is essential, particularly if you pay bills online.

There are certain keywords that could trigger ghosting on Craigslist. How to Safely Sublet an Apartment Through Craigslist. craigslist search After reading the agreement, go through the button so you will is going to be asked to look at the email hence the ad will go live. Deleting search history is essential, particularly if you pay bills online.

Unless you need to include multiple authorized users to a single account, spending money with a paid account is just not worthwhile. Select the form of posting –– service businesses can click “service offered” while companies that sell products must choose “on the market by owner” or “available for sale by dealer. all of craiglist You sell nearly anything within the Craigslist Web site, including furniture of the type and size. A report on cities, states and countries is located for the right side in the Craigslist homepage.

Unless you need to include multiple authorized users to a single account, spending money with a paid account is just not worthwhile. Select the form of posting –– service businesses can click “service offered” while companies that sell products must choose “on the market by owner” or “available for sale by dealer. all of craiglist You sell nearly anything within the Craigslist Web site, including furniture of the type and size. A report on cities, states and countries is located for the right side in the Craigslist homepage.

The numerous resumes posted to Craigslist each day could be viewed by anyone. To make use of the discussion forums and community boards, users create unique handles that uniquely identify them within the site. search all craigslist Type the body within your listing inside "Posting Description" box. but unfortunately, housing rental scams are occasionally advertised.

The numerous resumes posted to Craigslist each day could be viewed by anyone. To make use of the discussion forums and community boards, users create unique handles that uniquely identify them within the site. search all craigslist Type the body within your listing inside "Posting Description" box. but unfortunately, housing rental scams are occasionally advertised.

viagra generic http://viagraonlineviagra.us/#651 - viagra without a doctor prescription

After creating a different ad and adding images into it, Craigslist may display a telephone verification screen. This causes the words to appear a similar color because background on Craigslist,. all of craigslist Craigslist is usually a popular position for renters to quickly find. If the possible adopter has young children or another pets, re-home your canine friend with her only when you feel your pet is certain to get along with these and is going to be safe within their company.

After creating a different ad and adding images into it, Craigslist may display a telephone verification screen. This causes the words to appear a similar color because background on Craigslist,. all of craigslist Craigslist is usually a popular position for renters to quickly find. If the possible adopter has young children or another pets, re-home your canine friend with her only when you feel your pet is certain to get along with these and is going to be safe within their company.

Adding keywords to your web page with Dreamweaver might be done by simply clicking on "Insert," picking out the "Html" button,. Craigslist could be a great resource to find used cars as part of your area, . search all craigslist If you "hide" your email address contact info, make sure to provide lots where interested buyers can call or text you. Place the wedding dress sale ad inside Craigslist "available" section in the "clothing" category to optimize the suitability of individuals who start to see the ad.

Adding keywords to your web page with Dreamweaver might be done by simply clicking on "Insert," picking out the "Html" button,. Craigslist could be a great resource to find used cars as part of your area,. search all craigslist If you "hide" your email address contact info, make sure to provide lots where interested buyers can call or text you. Place the wedding dress sale ad inside Craigslist "available" section in the "clothing" category to optimize the suitability of individuals who start to see the ad.

Adding keywords to your web page with Dreamweaver might be done by simply clicking on "Insert," picking out the "Html" button,. Craigslist could be a great resource to find used cars as part of your area,. search all craigslist If you "hide" your email address contact info, make sure to provide lots where interested buyers can call or text you. Place the wedding dress sale ad inside Craigslist "available" section in the "clothing" category to optimize the suitability of individuals who start to see the ad.

Looking at and analyzing free resumes will take as little as 5 minutes. Type the 10-digit ad identification number in the "Craigslist Search" box, located. search craigslist by state Buy & Sell Collectibles; Manga; How to Write on Leather; X. Craigslist could be the online garage sale with three things going because of it -- it's convenient, it's easy and it's really free.

Craigslist also prohibits from including a tracking script as part of your post. Take pictures in good lighting, that shows the truth condition with the bag. search craigslist by state Craigslist will be the perfect place to search for used pickups that…. Delete old posts as soon because the ad isn't longer valid.

As you can view, we show "job offered", "jobs wanted", if you desire to post your resume confident that someone go on should they're looking for the certain sort of person, and discover your resume and make contact with you. On the other hand, in addition, it means which you have a good amount of freedom and suppleness for tweaking your Craigslist content. search all craigslist Their email address contact information will originate from Craigslist itself as indicated previously and may even include specific questions around the item. Type the body of the listing from the "Posting Description" box.

As you can view, we show "job offered", "jobs wanted", if you desire to post your resume confident that someone go on should they're looking for the certain sort of person, and discover your resume and make contact with you. On the other hand, in addition, it means which you have a good amount of freedom and suppleness for tweaking your Craigslist content. search all craigslist Their email address contact information will originate from Craigslist itself as indicated previously and may even include specific questions around the item. Type the body of the listing from the "Posting Description" box.

viagra alternative buy viagra usa 2013 viagra online sale http://canadian-pharman.com

cialis cialis 5mg cialis 5mg

viagra without a doctor prescription overnight delivery viagra without stimulation viagra without a doctor prescription usa

online viagra sales http://v1agraonline.com/#2298 - viagra on-line ordering

generic viagra for sale http://viagra-generics.us/#1262 - generic viagra without a doctor prescription

viagra without subscription viagra without subscription viagra without insurance

Pages

Add new comment