Development

Drupal 8 Migration

October 26, 2016

Jake Litwicki

By Jake Litwicki

Drupal is a free and open-source content-management framework written in PHP and distributed under the GNU General Public License that began in 2001. It has, as of May 2016, evolved into the newly released Drupal 8.1, which, combined with Drupal 6 and 7, powers over 2.2 million websites in the world.

Over the last 6+ years the community, backed by Acquia, “the leading cloud platform for building, delivering, and optimizing digital experiences,” has taken many strides towards improving the flexibility and stability of the platform. With Drupal 6 and Drupal 7, much effort was put into supporting the community of 33,000+ developers who help make Drupal what it is. This included making several improvements to the management of modules and themes, as well as extending and improving (and adding to) the countless APIs available to developers and themes.

This is a sample of the more prevalent issues that plagued earlier releases of Drupal:

  1. PAC (presentation-abstraction-controll[er]) architecture pattern
  2. Lack of mobile-first support
  3. Caching, particularly unwanted cache handling
  4. Test-driven-development (TDD) virtually impossible
  5. Heavy coupling of configuration with database
  6. Performance, particularly memory usage

Drupal has addressed or outright solved many of these problems with the release of 8.0 (and now the public stable release of 8.1.)

Drupal 8 benefits

Drupal 8 Was Completely Redesigned

While the PAC paradigm itself isn’t wrong or inherently problematic, when one of the objectives of your platform is to isolate data, logic, and presentation, the PAC paradigm forces designers and themers to write code instead of focusing exclusively on templates and design.

Leveraging components from Symfony, and elsewhere, Drupal modules are now treated as plugins that are properly namespaced and lazy loaded using dependency injection for dramatic performance improvements, and widespread support of popular libraries and extensions. (You can find official documentation here.)

Drupal 8 and Mobile

The Drupal 8 Mobile Initiative is “a concerted effort to make Drupal 8 a first-class mobile platform.”

Acquia has written a wonderful article outlining a lot of the efforts that went into designing the many improvements centered around mobile support for Drupal 8. To name a few:

  • Mobile First
  • Responsive-ize everything
  • Mobile-friendly toolbar
  • Responsive “preview”
  • Performance tuning/enhancements

Drupal 8 Supports Cache Tagging

Cache tags are built directly into the Drupal 8 core, which allow reverse proxies to leverage metadata to every node on the site and intelligently identify whether or not to expire the page. When combined with Varnish (or a similar service) the performance opportunity becomes an immediate win for bypassing the query heavy page-load time of a “fresh” node.

Test-Driven Development (TDD)

With the decoupling of configuration in the core database, and the implementation of YAML config files, Drupal 8 now supports TDD far greater than any previous versions.

So, How Do I Upgrade or Migrate My Old Drupal Website?

Acquia has sponsored and authored the development of Migrate Upgrade, which is a module focused specifically on upgrading Drupal 6 and Drupal 7 websites to Drupal 8.

Using this tool, and some quick and dirty commands, you can very quickly migrate to Drupal 8 and start leveraging all those new features!

Copy
 drush si standard --db-url=mysql:user:pass@hostname/dbname 
Copy
 drush dl drupal /path/to/html && cd /path/to/html 
Copy
 drush site-install standard --db-url=mysql://user:password@hostname/db 
Copy
 drush dl migrate_upgrade features -y 
Copy
 drush en migrate_upgrade features -y 
Copy
 drush migrate-upgrade --legacy-db-url=mysql::user:password@hostname/db --legacy-root=http://mysite.dev --legacy-db-prefix=drupal6_ 

 

Keep in mind that there are still a few drawbacks, so it’s not entirely done at this point:

  • entityreference, user_reference and node_reference will not have migrated
    • Also a timesaver: The bundle column in field tables will correspond to the node type in D8, rather than simply node
  • User profile images will more than likely be null and require a re-upload depending on how your previous public/private file system was set up in Drupal 6
  • Views will not be migrated as they’ve been restructured and worked directly into Drupal core

Eventually, Drush will support all this functionality, which will make this module obsolete; in the meantime, it’s a very handy middleware tool that greatly helps the migration of standard Drupal websites.

Need help migrating or upgrading your modules to Drupal 8? We have experts. Contact us to learn more.

Jake Litwicki

Jake Litwicki

Software Development Director

Unless otherwise specified, source code in this post is licensed under a
Creative Commons Attribution 4.0 International license (CC BY 4.0).

You might also like...

6

Mar.

Sean McKay

Cooperating with Data: Strategies for Comparison, Filtering, and Manipulation

When the data we have isn’t available in a useful format, it is easy to fall into patterns of brute force processing or to implement approaches that are not optimal for manipulating or managing data. How data is used – such as in reports, or searches completed by users – is an ongoing, ever-changing problem. … Continued

7

Feb.

Jeff Dance

10 Factors for Choosing a CMS

There are dozens of Content Management System (CMS) platforms available to to help you manage the content, marketing, and SEO on your website. But with all the good options out there, how do you know how to choose the right CMS? Consider the following 10 factors when choosing your CMS. #1 Price Some CMS licenses start … Continued

23

Jan.

Amber Franz

A Designer’s Perspective: Fostering Good Communication Between Design and Development

Different teams will have different ideas and perspectives of what the final product should be – designers and developers often have different thoughts on the best direction forward. Each group also has a different set of skills and capabilities that are important to creating high-quality products. In the end, pulling the best ideas together and … Continued