Accueil / Installing Drupal 8 on Acquia Cloud

Installing Drupal 8 on Acquia Cloud

Want to use the most awesome version of Drupal on the most awesome Drupal hosting? ;) This guide is for you!

Let's Get Started!

Sign up for a free Acquia Cloud account.

First, head to http://www.acquia.com/acquia-cloud-free to set up your new site. This process takes a few minutes, but worry not; you can bide your time watching helpful tutorial videos! Once your site is provisioned, you'll be taken to the Acquia Cloud workflow page.

Upgrade PHP version (important!)

Set PHP version to 5.5

Drupal 8 requires at least PHP 5.4 in order to install, so the first order of business is switching your environments' PHP versions, which you can easily do from the Workflow page.

  1. Click on the triangle at the right of your Dev environment block
  2. Click on Configure
  3. Select PHP 5.5 and click Save
  4. Repeat the same steps for your all environments.

See Configuring PHP Settings for more information.

Add SSH keys

Add SSH key to Acquia Cloud

  1. Go to Cloud > Users and keys and click Add SSH key
  2. Give it a name, and paste in your public key file's contents.
  3. If you have no idea what that is ;) follow the instructions at either Mac and Unix or Windows.

Add Drupal 8 Files to Git

Git URL information

  1. Click the Git URL box in the top-right corner of the Workflow page to view a pop-up with your subscription's Git information. Your Git URL should be somethinglike:

  2. Clone your Git repository to your local computer following the instructions in the pop-up. This command should be something like:

  3. Download the latest release of Drupal 8 from https://drupal.org/node/3060/release?api_version%5B%5D=7234:

  4. Extract it to the Git clone of your site's "docroot" folder:

    tar --strip-components=1 -zxvf drupal-8.0-alpha12.tar.gz -C d8/docroot

    When finished, your Git repository's directory structure should look something like this:

    Drupal 8's files nested inside the docroot folder.

  5. Now, add the new files to your site's Git repo:

    cd d8
    git add .
  6. Finally, commit/push the changes to get the D8 files onto your dev server:

    git commit -m "Initial commit: Add all the D8 code files."
    git push origin master

Adding and configuring settings.php

Acquia Cloud-specific snippet to copy and paste into settings.php

You're just about ready to go! One last thing: we need to set up settings.php, specifically for Acquia Cloud's fancy-schmancy security (that's the technical term).

  1. First, create your settings.php file from default.settings.php:

    cd docroot
    cp sites/default/default.settings.php sites/default/settings.php
  2. Next, go to Cloud > Databases, and click the "Configure settings.php" button. It should show you some code like:

    if (file_exists('/var/www/site-php')) {
      require '/var/www/site-php/webchickd8test/webchickd8test-settings.inc';
    }
  3. Copy the include code, edit settings.php and add it to the end of the file.
  4. Finally, add and push the settings file into Git:

    git add sites/default/settings.php
    git commit -am "Adding settings.php."
    git push origin master

Install away!

First page of D8 installer

Now you're ready to Install Drupal 8 by going to http://SITENAMEdev.devcloud.acquia-sites.com/core/install.php (NOTE: you need to go directly to the install.php script; navigating to the home page instead will give you errors).

Troubleshooting Tips

Viewing a PHP error log from Acquia Cloud.

Drupal 8 is still under active development. You may run into issues attempting these steps. Here is some general troubleshooting advice.

When I visit my new Drupal 8 Acquia site in order to set it up, I just get a blank white screen (also known as White Screen of Death (WSOD)). Help!

Generally, this occurs because PHP hit an error it could not recover from. First, figure out what happened.

Navigate to Cloud > Logs and download the PHP log for the environment that's getting the blank page (for example, "Dev environment").
This will give you a file called php-errors.log.
Open this file in a text editor or error console, as picrtured above.

(For more help on this topic, see About Acquia Cloud logging.)

Syntax error in a core file? Make sure your PHP version is updated.

If you see an error like "PHP Parse error: syntax error, unexpected '[' in /mnt/www/html/[USERNAME]/docroot/core/vendor/guzzlehttp/guzzle/src/functions.php on line 20" the most likely culprit is your environment is still on PHP 5.3, versus PHP 5.5. To resolve this problem, follow instructions under "FIrst: Upgrade PHP." Then, manually go to the http://[YOUR_SITE]/install.php URL.

Remember: the PHP version must be set per-environment.

That didn't fix it / It was some other weird PHP error.

This can also happen due to stale files in the compiled PHP directory (new to Drupal 8). Try following the troubleshooting tips at https://drupal.org/documentation/rebuild.

When I visit my new Drupal 8 Acquia site in order to set it up, I get an "Additional uncaught exception thrown while handling exception." error. Help!

If you see errors on the home page to the effect of "Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'webchickd8testdev.url_alias' doesn't exist: SELECT source FROM {url_alias} WHERE alias = :alias AND langcode IN (:langcode, :langcode_undetermined) ORDER BY langcode ASC, pid DESC; Array ( [:alias] => user [:langcode] => en [:langcode_undetermined] => und ) in Drupal\Core\Database\Connection->query() (line 569 of/mnt/www/html/webchickd8testdev/docroot/core/lib/Drupal/Core/Database/Connection.php).", this is caused by the settings.php tweak that pulls in Acquia Cloud's database info. It's complaining that tables don't exist because you haven't yet installed Drupal.

Don't be alarmed! Simply navigate directly to http://[YOUR_SITE]/install.php instead.

The installation went fine, but now I get "If you have just changed code (for example deployed a new module or moved an existing one) read http://drupal.org/documentation/rebuild" on a blank white page. Help!

It sounds odd, but try running through the update.php process at [YOUR_SITE]/update.php. It should clear various caches and get you back up and running with your new D8 site!

Congratulations!

Viewing a PHP error log from Acquia Cloud.

Hope you enjoy Drupal 8! :)

Commentaires

Posted on by Mike Gifford.

Thanks for this Angie. It didn't occur to me that the MySQL password required for the installation would be just to leave it blank. I spent a bunch of time searching around within the Acquia Cloud interface for a reference to a generic MySQL password before just trying it blank.

Other than that minor issue, it was smooth.

Ideally I'd be able to use Git submodules though rather than just copy over Drupal 8's Core files. When I tried this it didn't look like Acquia's interface supported this. It could be I was just doing it wrong, but...

Ajouter un commentaire

Plain text

  • Aucune balise HTML autorisée.
  • Les adresses de pages web et de courriels sont transformées en liens automatiquement.
  • Les lignes et les paragraphes vont à la ligne automatiquement.

Filtered HTML

  • Use [acphone_sales], [acphone_sales_text], [acphone_support], [acphone_international], [acphone_devcloud], [acphone_extra1] and [acphone_extra2] as placeholders for Acquia phone numbers. Add class "acquia-phones-link" to wrapper element to make number a link.
  • Pour publier des morceaux de code, entourez-les avec les balises <code>...</code>. Pour du PHP, utilisez. <?php ... ?>, ce qui va colorier le code en fonction de sa syntaxe.
  • Les adresses de pages web et de courriels sont transformées en liens automatiquement.
  • Tags HTML autorisés : <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <h4> <h5> <h2> <img>
  • Les lignes et les paragraphes vont à la ligne automatiquement.
By submitting this form, you accept the Mollom privacy policy.