4

I want to use drush for upgrade my drupal 6 to drupal7. i read this document. i have a problem with create alias. i have been doing this

1- create a subdomain in my plesk (create sub.domain.com)

2- go to /var/www/vhosts/domain.com/httpdocs and download this file and rename this to "aliases.drushrc.php"

3- remove aliases.drushrc.php content and replace with

<?php $aliases['sub'] = array( 'root' => '/var/www/vhosts/domain.com/sub', 'uri' => 'sub.domain.com', ); ?>

4- run command: drush @sub status and i get this error:

The drush command '@sub status' could not be found. Rundrush cache-clear drushto clear the commandfile cache if you have installed new extensions

3

Although the Drupal root is a valid place to store alias files, Drush will not be able to find the alias records described there until the Drupal root as been specified. Therefore, drush @sub status has a chicken-and-egg problem; you want to use @sub to specify the Drupal root, but Drush won't load the alias file that defines @sub until the Drupal site it is defined in is bootstrapped.

To resolve this problem, move your aliases file to $HOME/.drush/aliases.drushrc.php. Once you do that, then your status command will work.

You may define your 'onward' alias either in $HOME/.drush/aliases.drushrc.php, or in /var/www/vhosts/domain.com/httpdocs/aliases.drushrc.php, per your preference.

0

Drush Site Upgrade needs to be installed first.

You can download the module and upload it to drush/commands/core folder. Now you will be able to run this command

If you are getting some problems when Drush tries to create a new database, create it first and enter it in the alias file.

1
  • 1
    The error message here is deceptive; although Drush is saying "command not found", what it is really reporting is that @sub is not found. Once the problem reported in the question has been resolved per my answer, then you are correct: drush dl drush_sup should be used to download Drush Site Upgrade to $HOME/.drush. Using drush dl to install a Drush extension will always clear the Drush commandfile cache; if you install an extension manually (e.g. via wget or cp), then you should run drush cc drush) afterwards. – greg_1_anderson Sep 16 '12 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.