
Upgrade Your Drupal Skills
We trained 1,000+ Drupal Developers over the last decade.
See Advanced Courses NAH, I know EnoughHow to install CiviCRM on Drupal 8 (and WHY choose it over pure Drupal CRM)
Last week, I published a super long article called Drupal 8 has left small non-profits behind... How can we fix that? which details the many issues Drupal 8 is having and their chilling affect on usage among nonprofit organizations.
It also proposes a possible path for fixing it: building an Open Source platform for nonprofit websites built on Drupal 8 and CiviCRM, available as a SaaS with hosting and support included.
We're looking for 10 nonprofits who are willing to participate in the BETA and help build it (in exchange for a FREE migration to Drupal 8 & CiviCRM).
Next week, we're planning to talk more details about how that BETA process will work!
However, this week, I wanted to take a little break from that, and talk more about CiviCRM in Drupal 8.
So, in this article, we're goning to:
- Walk through how to install CiviCRM on Drupal 8. It's quite complicated now, but we're helping to improve that.
- Talk about why we're betting on CiviCRM and not a CRM built in Drupal. There's a couple of great, pure Drupal solutions to CRM, like RedHen or CRM Core - but we've chosen to go with CiviCRM. Why?
Read more to find out!
CiviCRM works on Drupal 8!
Contrary to popular belief, CiviCRM mostly just works on Drupal 8 :-)
The CiviCRM team did a push (with the help of some fundraising) to do most of the big work needed. However, there are a couple of small (but very hard) problems remaining around installation. But once you get it installed, you're golden!
The main problematic piece of this is handling composer.
Composer is tool for installing PHP code into applications, like Drupal. It handles the difficult problem of getting all the dependencies (and their dependencies) at a mix of versions that will work together. It's becoming adopted pretty widely in the PHP world, but is still relatively new. Drupal 8 is built on it.
Both Drupal 8 and CiviCRM use Symfony and a couple other shared dependencies. So, the core CiviCRM code needs to be installed into your Drupal 8 site with composer, in order to combine everything together in a way that works. CiviCRM does use composer, but it's pretty early days.
Over the last several weeks, we've been helping to improve CiviCRM's composer support so it could be correctly installed into a Drupal 8.3 or 8.4 site.
Not much of this work has been merged yet, but we have a reproducible set of steps for getting CiviCRM installed that you can use today!
Getting started the easy way
In the next section, we're going to describe the manual process to add CiviCRM to an existing CiviCRM site.
However, if you just want to launch a new site with all the CiviCRM stuff already there, we have a "easy way" for you!
We made a project on GitLab with all the composer stuff already done and the Drupal module included and patched! Here's the process:
- Download the ZIP or TAR.BZ2 file (linked version is Drupal 8.3.6 + CiviCRM 4.7.22)
- Install just like vanilla Drupal 8
- Go to the "Extend" page (at /admin/modules) and install the CiviCRM module
- Log out and log back in again per CRM-19878
I don't know how long we'll maintain this specific repo, but I'll try to keep it up-to-date until we have some code publicly available from the BETA of our Drupal 8 & CiviCRM platform which will replace this.
The full, manual process
If you want to add CiviCRM to an existing Drupal 8 site, you'll have to follow the manual process.
Once all these little (but very hard!) problems are fixed, and the fixes are merged into CiviCRM and related libraries, it'll be a single composer command to get CiviCRM added to your existing Drupal 8 site.
However, right now, the manual process is not so easy.
But if you wanted to do it, we have a reproducible process that you can follow!
- Download and install Drupal 8.3.6 (or the latest dev of Drupal 8.4.x!)
- Go into the root directory in the shell and run these commands to install CiviCRM via composer (one day this will just be
composer require civicrm/civicrm-core). Assuming you have composer, bower, git and wget, you should be able to just copy-and-paste those commands into the command-line. - If you use Apache, remove the 'vendor/.htacess' file. This is a security measure from Drupal, which prevents resources like CSS/JS being loaded. This will need some collaboration with the Drupal project to figure out a proper solution for because removing this file altogether is a bad idea on production. See: https://www.drupal.org/node/2896308
- Go into the /modules directory and do:
git clone https://github.com/dsnopek/civicrm-drupal.git --branch composer-library - Go to the "Extend" page (at /admin/modules) and install the CiviCRM module
- Log out and log back in again per CRM-19878
- CiviCRM works!
As we've been making progress on the changes for CiviCRM to better support composer, I've been removing commands from the Gist with the special process in step #2, which I plan to continue doing until it's not necessary.
If you have problems (or succeed), I'd really appreciate the feedback!
(And if you post those problems or successes on the PR on GitHub, it'll help move forward the process of committing those changes!)
Why CiviCRM and not RedHen (or other pure Drupal solution)
So, with all that trouble to get CiviCRM working, why even use it?
Drupal is a powerful framework for building awesome things. Why not make some new entity types for CRM-y things like Contacts and Activities, throw some fields on there and make a pure Drupal CRM? There's even some great pre-existing Drupal modules like RedHen and CRM Core to build on.
Drupal can do anything, why not a do a CRM? ;-)
We fell into CiviCRM sort of by accident. A strong plurality of our customers are nonprofits and many of them use CiviCRM, so, we had to start supporting it!
We found that, for many of them, their CiviCRM was actually more important to their daily lives and the operation of their organization than the website.
After spending some time with CiviCRM, we're doubling down on it for our new nonprofit Drupal 8 platform. Here's why...
CiviCRM community is larger than any Drupal CRM module
The CiviCRM community is much smaller than the Drupal community, but much larger than the community around any of the Drupal CRM modules.
The core CiviCRM team is only 4 people, but they work on CiviCRM full-time. (And they don't do CiviCRM installations or paid support or anything like that - they only work on core issues that benefit the whole community.)
There are regional CiviCon's and CiviCamps and monthly meetups - all over the world.
There are multiple books written about CiviCRM.
There are 67 partner/contributor organizations listed on civicrm.org, who provide any number of services: setting up CiviCRM installations, doing trainings, providing support & maintenance, SaaS hosted versions of CiviCRM, etc. And there's probably even more commercial companies out there!
While it would be really cool, I can't really imagine there being four RedHenCon's held in the UK, US, Australia and Germany in a single year, like the 4 CiviCon's scheduled in 2017. :-)
CiviCRM is a complete product
Most Drupal modules are legos, not complete products.
Of course, there are exceptions, but usually you're expected to assemble a set of modules into a thing, rather than a module being a thing.
CRM Core and RedHen are a set of tools in order to build a CRM. They are not complete CRM's on their own.
We could certainly make a CRM as complete as CiviCRM by combining Drupal modules. But none that are out there are quite as complete as CiviCRM, especially, with regard to nonprofits...
CiviCRM is really well suited to nonprofits
The best CRM is one built specifcally to the needs of your organization. For this reason, all CRM's are customizable to some degree, but most CRM's are closer to the needs of certain organizations.
For example, at myDropWizard, we use HubSpot for our CRM. We're a commercial support & maintenance company, so the most useful feature in HubSpot for us is configurable "deal workflows" and seeing all active deals in a workflow-specific kanban board.
We wouldn't be able to use CiviCRM because it's completely missing this feature. But nonprofits don't miss it because their businesses don't depend on deal flow. By the same token, a nonprofit would be missing the pledge, fundraising, grant and volunteer management features that are present in CiviCRM if they tried to use HubSpot.
By focusing only on the needs of nonprofits, CiviCRM has been able to grow into a really killer piece of software for nonprofits.
RedHen and CRM Core are also slanted to towards nonprofits, but seem to leave the door open to being more general, and haven't grown to support as many use cases that are important to nonprofits.
CiviCRM has less "vendor lock-in"
Since Drupal is Open Source, there really isn't true "vendor lock-in" - there are loads of Drupal shops who can help you and you're free to switch.
But we've seen how hard it can be to move from Drupal 6 or 7 to Drupal 8, where people can get stranded in an old version.
The same version of CiviCRM can work in Wordpress, Joomla, Backdrop or Drupal 6, 7 & 8.
If you have a Drupal 6 site using the latest CiviCRM, you can move the core CRM piece to either Wordpress or Drupal 8, basically unchanged. CiviCRM has it's own extension system, which allows the same extension to be used in any supported CMS.
Of course, if you're using Drupal modules that interact with CiviCRM, those would need to be ported just like any Drupal module.
But I think just knowing there is this extra freedom to migrate is good for users who may be concerned about the long-term prospects of Drupal 8.
Join our BETA!
Like I said in the intro we're building an Open Source platform for nonprofit websites built on Drupal 8 and CiviCRM, and looking for nonprofits to be a part of the BETA.
If you're interested, please click the big green button below to...
Join the BETA or get progress updates
We're going to be announcing more details about the BETA next week, but you can read what we're already said about it in last week's article.
Have any experience with CiviCRM? Good or bad? Tried installing it in Drupal 8? Please leave a comment below!
About Drupal Sun
Drupal Sun is an Evolving Web project. It allows you to:
- Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
- Facet based on tags, author, or feed
- Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
- View the entire article text inline, or in the context of the site where it was created
See the blog post at Evolving Web