About this document
Drupal 7 is now officially End of Life and is not recommended for new sites.
If you are still using Drupal 7 this list of options will help you evaluate your best course of action.
Get the code¶
The CiviCRM download page provides a pre-built archive for use with Drupal 7. A
typical archive file is ~20mb and looks like civicrm-X.Y.Z-drupal.tar.gz
. It contains a folder named civicrm/
.
In Drupal 7, there is a folder for storing add-on modules: DRUPAL_ROOT/sites/all/modules
.
Our goal is to download the archive and extract into this folder. Here are a few example ways to download and extract:
Download via web-browser
This method does not require shell access on the server. You may adapt based your server's arrangement.
- On the CiviCRM download page, click the link for CiviCRM / Drupal 7. Save the file locally.
- Extract the archive locally. For example, in a Linux workstation, one might say:
cd ~/Downloads tar xvzf civicrm-X.Y.Z-drupal.tar.gz
- Observe the new folder
civicrm/
. - Using your favor file-transfer system (SSH/SFTP,
rsync
,git
,mv
, etc), transfer thecivicrm/
folder toDRUPAL_ROOT/sites/all/modules
.
Download via curl + tar
This method require shell access to the Drupal server.
- On the CiviCRM download page, note the current version.
- In the shell, navigate to the Drupal module folder (adjust as appropriate):
cd DRUPAL_ROOT/sites/all/modules
- In the shell, run the
curl
andtar
commands. Adjust the versionX.Y.Z
to the appropriate value.curl -L "https://download.civicrm.org/civicrm-X.Y.Z-drupal.tar.gz" | tar xvz
Download via Drupal web UI
This is the easiest way for a new administrator. However, it may not work in all deployments or all versions. For example, if the Drupal server has a locked-down configuration, then it may encounter permission errors or timeouts. The only way to find out is to try.
- On the CiviCRM download page, right-click the link for CiviCRM / Drupal 7. Copy the URL.
- Login to your Drupal site with administrator permissions.
- Navigate to Modules >> Install new module.
- Paste the URL
- Click "Install"
This may not work with CiviCRM 5.13-5.30
In CiviCRM versions 5.13 - 5.30, the prebuilt tarball included a symlink which is not accepted by the Drupal 7 installer. This should work again in 5.31.
The "Upload"/"Browse" option is unlikely to work.
The Install new module page provides another option for uploading the archive from your local computer. In a default PHP configuration, the upload limits are too conservative to accept the CiviCRM archive.
In all cases, the final outcome should be the creation of a new folder
DRUPAL_ROOT/sites/all/modules/civicrm
Get the translations for Drupal 7¶
The basic CiviCRM release includes support for US English (en_US
). To use another language or dialect, please download and extract the translation files.
Run the installer for Drupal 7¶
The installer verifies requirements, prepares the database, and initializes the configuration file. You may run the installer through the web interface (which is simpler) or the command-line interface (which has more options).
Run installer via Drupal 7 web UI
- Enable the "CiviCRM" module
- Login to your Drupal site with administrator permissions.
- Navigate to the "Modules" page (
admin/modules
). - Find "CiviCRM" and enable it.
- At the bottom, click "Save Configuration".
-
After enabling, the status message will display a link to "configure CiviCRM". Click it.
What if I didn't notice the link?
Use the URL bar. Navigate to the
civicrm
page (e.g.https://example.com/civicrm
). -
The CiviCRM installer will open.
- If there are unmet requirements, the installer will list them. Consult the Requirements documentation for additional advice.
- If all the requirements are met, proceed through the brief questionnaire.
- If you have a separate MySQL database for CiviCRM, then locate "Environment: CiviCRM Database". Click the edit icon and enter the database URL.
- Finally, click "Install CiviCRM".
Run installer via the command-line
CiviCRM has a command-line administration tool, cv
, which can perform installation. For details, see command-line installer.
Troubleshooting¶
- Review the Troubleshooting page for help with problems you may encounter during the installation.