---
title: "How to update to drupal/core-composer-scaffold in Drupal 8"
date: "2022-03-16T17:17:31+00:00"
summary:
image:
type: "article"
url: "/acquia-cloud-platform/help/94646-how-update-drupalcore-composer-scaffold-drupal-8"
id: "432b3ec6-d7b3-4982-bd56-86c86a60e97d"
---

Before doing this update you need to make sure your Drupal core is 8.8 or higher then follow the steps below:

1\. Remove `drupal-composer/drupal-scaffold` from your project:

    composer remove drupal-composer/drupal-scaffold

2\. Modify your `composer.json` and remove any instant of `drupal-scaffold` located if your `extra` or `scripts` section like the following:  
_Note: The following does not work with the new scaffold project._

    "drupal-scaffold": {
        "excludes": [ ".htaccess", "robots.txt" ]
    },

3\. Install the `drupal/core-composer-scaffold` by running the following command:

    composer require drupal/core-composer-scaffold:^8.8 --no-update

4\. You must define where the web root is located. It does so via the locations mapping, as shown below:

    "extra": {
      "drupal-scaffold": {
        "locations": {
          "web-root": "./docroot"
        },
        ...
      }
    }

5\. You might prefer to entirely replace a scaffold file provided by a dependency, and receive no further updates for it. You can do this by adding the following:

    "extra": {
      "drupal-scaffold": {
        "file-mapping": {
          "[web-root]/.htaccess": false
        }
      }
    }

6\. Run the following to update your lock file:

    composer update --lock

7\. If you are still using `drupal/core` in your `composer.json`, simply remove it and add `drupal/core-recommended`:

    composer remove drupal/core
    composer require drupal/core-recommended:^8.8