Interested in helping out with the Migrate in Core initiative? This page is a great place to start, as to ensure that you've got everything you need in-place on your local machine.
Prerequisites
- Comfort with the command-line - The user interface at this time is drush, so some command-line comfort is required.
- PHP 5.4 - required for Drupal 8.
- Git - https://drupal.org/documentation/git/install
- Drush 7 - https://github.com/drush-ops/drush#install---composer - for manual testing of individual D6->D8 migrations, install the latest version of Drush. It is strongly recommended to install Drush 7.x via Composer.
- A Drupal 6 site - Migrate only reads from this database. Even so, it is not recommended to run migrations against a production database! For initial testing, use a fresh Drupal 6 site with only the CCK and Link modules enabled and some sample content.
- A Drupal 8 site - It must be the latest version, https://drupal.org/project/drupal/git-instructions
- Enable the migrate_drupal module, this enables the migrate module as well.
drush en -y migrate_drupal
- Make sure drush can write to the config directory.
sudo chmod -R a+w sites/default/files/config_*/active
- Enable the migrate_drupal module, this enables the migrate module as well.
- Test your environment - Run a block migration. If everything works, then you're ready to hit the issue queue!
Two (Main) Ways of Testing
- module-by-module - this allows for more targeted troubleshooting and reduces the amount of data that needs to be compared. See the meta-issue at https://drupal.org/node/2221733
- whole migration - Ideally, after testing each module migration, you'll run a complete migration. This should allow focus on performance.
See the complete migration meta-issue here: https://drupal.org/node/2221779
Need help figuring out what to work on? Ask in #drupal-migrate on IRC!
What to expect
Some issues that you may run into include the following items which may not be migrated properly:
- CCK Link fields - should be fixed once this this core patch is complete and committed.
- Menu items.
- Uploaded files
- URL Aliases
Starting fresh
Run each test on a fresh, clean Drupal 8 install.
This is when drush si
is your friend! It will drop and recreate the database, delete old files that cause issues, and save you from having to enter installation data!
From the document root of your site, run:
drush si --account-pass=admin
Use the --db-url parameter
if necessary:
drush si --account-pass=admin --db-url=mysql://username:password@localhost:port/dbname
Then enable the migrate_drupal module:
drush en -y migrate_drupal
Now, you can log in as admin/admin rather than needing to pay attention to the random password that drush si
would create without the --account-pass=
option.
Note: Migration rollbacks have not yet been implemented (bummer, we know).
Problems?
Permissions
It may be easier to run drush as the web-user
On Fedora: sudo -su apache
On Debian: sudo -su www-data
Files not copied
Drush does not have a parameter for the files location so it often fails. Try using the migrate_upgrade module.
Note:
The following do not have migration paths yet:
- Forums
- Menu links
- Anything removed from core (OpenID associations, banned IPs come to mind)
Comments
sample manifest
save the following lines in test-manifest.yml
note: this will migrate nodes and field definitions. however, all the fields will be empty except for the title. i'm not sure if i'm missing a migration or if that's just not implemented yet.
Disregard this sample manifest
The sample manifest was totally relevant back in January, but now it is appropriate to download the .yml file from the relevant testing issue.