You manage a popular news portal which has a very busy comments section. You've been asked to add several new fields and a View for the news area of a site. The QA team wants to review your work in staging before rolling everything out to production at once. The editorial team has specified that the site's comments activity should not be affected by these changes.
How can you meet these requirements without having to create the new functionality independently in both environments?
A. Copy the production database into the staging environment. Create the fields and View there. Once QA is satisfied, copy the staging database into the production environment.
B. Configuration created in the staging environment is automatically available to the production environment since they share a database.
C. Create the fields and View in a fresh installation of Drupal core. Export the site configuration into your site's existing codebase, push the code to the staging environment, and import the site configuration there. Once QA is satisfied, repeat the process in production.
D. Create the fields and View in a development copy of the site. Export the site configuration to code. Push that code to the staging environment and import the site configuration there. Once QA is satisfied, repeat the process in production.
Explanation:
Drupal’s configuration management system is specifically designed to move site configuration ―such as content types, fields, vocabularies, and Views―between environments by exporting configuration to files and then importing it elsewhere. Drupal documentation explicitly describes configuration as the administrative settings that determine how the site functions, and it lists fields and views as examples of configuration.
That makes option D the correct workflow: build the new fields and View on a development copy of the site, export the configuration to code, deploy that code to staging, import it for QA review, and then repeat the import in production after approval. This preserves live editorial activity such as comments , because comments are site content , not configuration, and configuration deployment avoids overwriting production content with a copied database.
Option A is risky because copying the staging database back to production could overwrite live comments and other newly created production content.
Option B is false because staging and production do not automatically share configuration through one database in a normal deployment workflow.
Option C is inferior because configuration should be created from a development copy of the actual site, where the existing modules, schema, and site setup already match the target environments.