Reference to EntityReference Field Migration


This module converts references fields (from references module) to entity reference fields. A batch task will be issued (per field) to create a temporary table, store the reference values, delete the reference field, create a new
entity reference field, and copy over the values from the temporary table.


There are 2 possible ways to convert fields:


Go to admin/content/migrate-references, select the fields you wish to convert, and click confirm.


Type 'drush entityreference-migrate-references' (or 'drush emr') to convert all fields. You may provide a field machine name as an argument to convert on a field-by-field basis.


Before starting any conversion, there are a few recommended tasks.


  1. Create a where-used list of fields, widgets and formatters, using:


  1. Create a where-used list of fields, filter criteria, sort criteria, contextual filters, using:
    • views: /admin/reports/fields/views-fields

How to build a sub-theme (Zen 7.x-5.x) - Automated using Drush

The base Zen theme is designed to be easily extended by its sub-themes. You shouldn't modify any of the CSS or PHP files in the zen/ folder; but instead you should create a sub-theme of zen which is located in a folder outside of the root zen/ folder. The examples below assume zen and your sub-theme will be installed in sites/all/themes/, but any valid theme directory is acceptable (read the sites/default/default.settings.php for more info.)

IMPORTANT NOTE: In Drupal 7, the theme system caches which template files and which theme functions should be called. This means that if you add a new theme, preprocess or process function to your template.php file or add a new template (.tpl.php) file to your sub-theme, you will need to rebuild the "theme registry." See

Drupal 7 also stores a cache of the data in .info files. If you modify any lines in your sub-theme's .info file, you MUST refresh Drupal 7's cache by simply visiting the Appearance page at admin/appearance.

This documentation is specifically for people who use Drush. You can take advantage of the drush zen command to automatically generate a sub-theme.

    Install Drush on CentOS (with H-Sphere)

    Below is how I install Drush on CentOS systems that have H-Sphere installed as a control panel

    1 - Grab a copy of Drush and untar it in your shared folder

    sudo wget --quiet -O - | sudo tar -zxf - -C /usr/local/share

    (Note, change the link above you the link to the latest version of drush on

    2 - Create a symbolic link to where Drush can be found on your server

    sudo ln -s /usr/local/share/drush/drush /usr/local/bin/drush

    Getting started with Git (for Drupal) on Windows

    New to Git? Take a look at Introduction to Git.

    Install Git on your local machine

    Download Git for Windows. Follow the link Download for Windows.

    Install using default settings only.

    Add Git Bash to the Taskbar. Open Start menu and type git. Right-click Git Bash then click Pin this program to the taskbar. In taskbar, right-click Git Bash icon, then right-click Git Bash, then click Properties.

    • Shortcut tab: Set the Start in option to your local server's root directory (e.g c:\xampp\htdocs)
    • Options tab: set Buffer Size to 500 or something large (Buffer size is number of lines for scrollbar to go back), check Quick Edit checkbox.
    • Click OK to close Properties dialog.

    Configure git user. Open your account, click Edit, then Git access. Copy Git user configuration and paste it into Git Bash. Lines should look like this:

    git config --global "Your Name"
    git config --global
    git config --global core.autocrlf true

    Running imports and rollbacks from the UI via drush

    As explained at Why you should run migrations in Drush rather than the UI, drush is a faster and more robust means of running large migration operations than the web-based UI is. As of Migrate 2.6, it is possible (with some advanced server-side configuration) to start migration operations from the UI that will run in the background via drush on the server.

    Configuring background operations

    To enable background imports and rollbacks requires some configuration on the server side. The key element is letting the Migrate module know where the drush command resides on the server, so it can be run. This is done by setting the Drupal migrate_drush_path variable to the full path of the drush command on the server, either in settings.php:

    ['migrate_drush_path'] = '/usr/bin/drush';

    or by setting the variable using drush:

    $ drush vset migrate_drush_path /usr/bin/drush

    On a windows server the path of the drush command has to include 'drush.bat', e.g. like C:\ProgramData\Drush\drush.bat.

    Using Drush Rebuild

    Drush Rebuild is a utility for rebuilding a local development environment from, for example, the production environment. Drush Rebuild uses Drush aliases and an easy-to-read YAML configuration file.

    To use Rebuild you must know how to work with drush aliases.

    Installation & configuration


    Rebuild can be installed with drush or git.

    Using drush: drush dl rebuild


    Subscribe with RSS Subscribe to RSS - drush