11.10. Deploying New Site Features

Last updated on
11 January 2024

Goal

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

Site prerequisites

Steps

  1. Open the local development site.
  2. 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.
  3. Select View from the Configuration type list.
  4. Select Vendors from the Configuration name list. The configuration appears in the textarea.
  5. Copy the configuration from the textarea.

    Export a single item

  6. Open the production site.
  7. In the Manage administrative menu, navigate to Configuration > Development > Configuration synchronization Import > Single item (admin/config/development/configuration). The Import page appears.
  8. Select View from the Configuration type list.
  9. Paste the configuration in the textarea.
  10. Click Import. The confirmation page appears.
  11. Click Confirm.
  12. 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 Bagian 11.8, “Making a Development Site”), and then you can follow the steps in Bagian 11.11, “Synchronizing Configuration Versions” to synchronize configuration between development and production sites.

Another alternative is to use the 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 Bagian 12.2, “Clearing the Cache”.

 

This page is generated from AsciiDoc source from the User Guide. To propose a change, edit the source and attach the file to a new issue in the User Guide project. PDF and e-book formats are available on the User Guide project page.

Source file: extend-deploy.asciidoc

Help improve this page

Page status: No known problems

You can: