There was much excitement in the Zodiac Media office for the release of Drupal 8. We have put our hand to a fair few large scale Drupal 7 sites and were excited to see how the inclusion of Symfony and it’s core components would progress the CMS.
Upgrading from Drupal 7 to Drupal 8 is a very involved process at the moment, it is no where near as simple as clicking a button and your site being ready to use. Here are some of the changes that you will notice when getting started with Drupal 8.
- Cleaner folder structure
- Views is now a core module
- Inline editing
- Routing is based around Symfony CMF
- Composer is used for Drupal components (but not third party modules)
- Templates are now in TWIG rather than PHP
- RESTful web services
- Completely rewritten caching system
The other major issue that you will probably notice is that most of the modules are not yet ported over or are now part of the core or do not have a migration path. This can and will cause you some major headaches.
Migrating our data
As our first Drupal 8 project, there seemed to be no better choice than our own Drupal 7 website. As a web development agency our site is fairly simple when it comes to content and installed modules, Our first step was to create a new Drupal 8 installation, we would then migrate our old theme and data over to the new installation. For this we used Vagrant and PuPHPet, which allows us to maintain a stable development environment across all of our developers machines and guarantees that we have less compatibility issues when deploying into a production environment.
We then moved on to downloading Drupal 8 core onto the development machine and fulfilling the initial setup steps of Drupal. The next step was to install Migrate Upgrade (https://www.drupal.org/project/migrate_upgrade), this allowed us to migrate all of our Drupal 7 sites content to the new database. At the time of writing, Migrate Upgrade is an experimental module, however it has been proposed for it to be integrated into the Core. We then installed any modules from the old site that had stable Drupal 8 versions.
We then exported our old Drupal 7 database into our new Drupal 8 database, making sure that we gave it a different name to what was being used by the Drupal 8 instance. Once complete, we navigated in to http://zodiacmedia.vagrant/upgrade, entered our Drupal 8 database credentials with the name of our newly imported Drupal 7 database.
We were then presented with a list of available and missing migration upgrade paths. This gave us a good indicator of what might be missing and also the work that we needed to do in order to get our Drupal 8 site into production. We had 16 available upgrade paths and over 70 missing. Once ready, we clicked upgrade and the migration began.
When it comes to non-core modules, running the migrate upgrade process will incorrectly report that no migration path is found for your installed modules. This is not the case, if the module is installed and has a migration pathway, them it will be run.
Migrating the theme (and custom modules)
Initially we thought that migrating the theme would be easy the easy bit, however quite a bit has changed from Drupal 7 to Drupal 8. On our Drupal 7 development site, we installed the Twigify module (https://www.drupal.org/project/twigify). Twiggify makes a best attempt at converting Drupal 7 PHP templates to Drupal 8 TWIG templates. Any lines that it fails on, are commented out and will have to be fixed. We then moved our newly TWIGified theme from our Drupal 7 site, to our Drupal 8 site. The next thing was to install the Drupal Module Upgrader (https://www.drupal.org/project/drupalmoduleupgrader) on our Drupal 8 site. This module attempts to convert the rest of the files in the theme to the necessary YAML file format. It is built to be used on modules, however we found it to do a fine job on themes. We then rinsed and repeated the same process from any custom modules that we had.
Getting to production ready
Due to the large amount of modules that have been either added to the core or not yet upgraded, you will now have the task of either integrating or replacing old modules. This took us around a week to get back to the point where our Drupal 7 site was at. This was mainly down to the fact that a couple of core modules such as Panels, were not yet fully ready for production and we therefore had to custom build like for like comparisons.
Drupal 8 is a massive improvement on Drupal 7. Is it production ready, maybe, in a year it will be a game changer. It is a major paradigm shift, which will challenge a lot of home developers, but will also prove to create a much stronger project. The integration and stability of a framework like Symfony can only be a good thing.
Drupal 8 has now lined itself up to follow the same direction as Wordpress and decouple it’s frontend from the backend thanks to RESTful services. Whether this will happen in the future, we don’t know. But it does allow the use of the Drupal 8 content management system with custom built mobile and web applications.
Drupal 7 is still rock solid and it will most likely be supported by the community until at least 2017, however the new features that Drupal 8 bring to the table should be enough to get you considering an upgrade. The decision to upgrade will really come down to whether you have the skill to upgrade it or the budget to pay for it.
For brochure site and blogs functionality, Drupal 8 is as ready as it is going to be, as much of the functionality for these purposes is baked right into the core. If your sites rely on a lot of custom or obscure modules, then they will need to be largely rewritten. Upgrading to Drupal 8 is by no means a simple undertaking.
If you’ve done the above and are looking for a second opinion or don’t know how to, then we’re here to help!