将 Drupal6 升级到 Drupal7
对所有文件、目录和数据库进行完整备份
*注:
在将站点的测试副本应用于您的实时站点之前,尝试对其进行更新或升级是明智的。即使是很小的更新也可能导致您网站的行为发生变化。
第 1 步:
Make note of non-core drupal modules(no need drupal core modules) and search if that all modules are available in drupal 7. If the modules are not available, then search “is there any alternate module for drupal 7”. Make sure of it. (*step 1 is important)
第 2 步:
Disable all non-core module.
Drush: drush pm-disable `drush pm-list --no-core --type=module –pipe`
第 3 步:
Change the default theme as “Garland”.
Drush: drush vset theme_default garland, drush vset admin_theme garland
第 4 步:
Update the drupal6.
Drush: drush up drupal
第 5 步:
Dump the DataBase.
Drush: drush sql-dump > /path-to-dump/my-sql-dump-file-name.sql
Terminal: mysqldump -u [username] -p [database name] > [database name].sql
第 6 步:
Download the latest Drupal7.
Drush: drush dl drupal --select`option to select the version`
第 7 步:
Copy “files” folder from old instance(Drupal6) to new instance(Drupal7) and change the folder permissions.
第 8 步:
Import the dumped DB to new instance.
Drush: (drush sql-drop, drush sql-cli < /path-of-dump/my-sql-dump-file-name.sql)
Terminal: mysql -u [username] -p newdatabase < [database name].sql
第 9 步:
Go to Drupal Root > sites > default > settings.php and change into $update_free_access to TRUE in the settings file and then run update.php.
第 10 步:
Download all the contributed modules : include `views and views related modules`.
第 11 步:
Must download Content Construction Kit (CCK) module. Enable the CCK, Content Migrate modules.
Drush: drush dl cck, drush en cck
Go to “Admin-Structure > Migrate fields”.
第 12 步:
In that Migrate fields,
After enable click “Migrate fields” in “Available fields” the fields are come under the “Converted Fields”. Once again run “update.php”.
*参考:https://drupal.org/update/themes/6/7