[[extend-deploy]]

=== Deploying New Site Features

[role="summary"]
How to copy a view created in a local development site to a production site.

(((Feature,deploying)))
(((Configuration,deploying)))
(((Feature,copying)))
(((Configuration,copying)))

==== Goal

Copy a view that you have created in a local development site to the production
site.

==== Prerequisite knowledge

* <<install-dev-making>>
* <<extend-config-versions>>
* <<install-dev-sites>>

==== Site prerequisites

* The core Configuration Manager module must be installed in both the
development and production sites. See <<config-install>> for
instructions on installing core modules.

* The Vendor content type must exist in both the development and production
sites, with the same fields. See <<structure-content-type>>.

* The Vendors view must exist in the development site but not the production
site. See <<views-create>>.

==== Steps

. Open the local development site.

. In the _Manage_ administrative menu, navigate to _Configuration_ >
_Development_ > _Configuration synchronization_ > _Export_ > _Single item_
(_admin/config/development/configuration/single/export_).
The _Single export_ page appears.

. Select _View_ from the _Configuration type_ list.

. Select Vendors from the _Configuration name_ list. The configuration
appears in the textarea.

. Copy the configuration from the textarea.
+
--
// Single configuration export of the Vendors view from
// admin/config/development/configuration/single/export.
image:images/extend-deploy-export-single.png["Export a single item"]
--

. Open the production site.

. In the _Manage_ administrative menu, navigate to _Configuration_ >
_Development_ > _Configuration synchronization_ _Import_ > _Single item_
(_admin/config/development/configuration_). The _Import_ page appears.

. Select _View_ from the _Configuration type_ list.

. Paste the configuration in the textarea.

. Click _Import_. The confirmation page appears.

. Click _Confirm_.

. Verify that the view was imported by navigating in the _Manage_
administrative menu to _Structure_ > _Views_.

==== Expand your understanding

The steps in this topic show how to export and import a single configuration
item. However, often if you develop functionality on a development website
and want to transfer it to your production site, you will need to transfer
multiple configuration items. For instance, if you developed a new content
type with fields, you would need to transfer several configuration items for
each field, one for the content type itself, and possibly multiple view mode
and form mode items, and they would have to be transferred in the right order.
Getting this right can be both tedious and difficult.

As an alternative, you can export and import the complete configuration of the
site. For this, you would need a local development site that is a clone
of the production site (see <<install-dev-making>>), and then you can follow the
steps in <<extend-config-versions>> to synchronize configuration between
development and production sites.

Another alternative is to use the
https://www.drupal.org/project/features[contributed Features module], which
allows exporting and importing bundled functionality (for example, all the
configuration for a photo gallery).

Finally, if you do not see the effect of these changes in your site, you might
need to clear the cache. See <<prevent-cache-clear>>.

==== Related concepts

* <<install-dev-sites>>
* <<planning-workflow>>

// ==== Additional resources


*Attributions*

Written by https://www.drupal.org/u/batigolix[Boris Doesborg].
