Skip to main content
Table of contents


Rename a country


We recommend you test out these instructions in integration and then staging before using them in production.

Renaming a country affects these pages:


1. Update Travel Advice Publisher

This will update<country_slug> to<new_country_slug>.

  1. Change the relevant name and slug in the lib/data/countries.yml file. Keep content_id and email_signup_content_id the same, and ensure the alphabetical order of the list is respected. Example

  2. Deploy Travel Advice Publisher

    • Once the above pull request is ready, deploy Travel Advice Publisher with a hard restart to update the countries YAML file.
    • You will see the country has updated in the list in Travel Advice Publisher
  3. Run Rake tasks

  4. Update the search metadata

    • In the UI, go to the country and create a new edition
    • Tick the “minor update” checkbox and update the Search title and Search description fields with the updated country name.
    • Save and publish.

2. Update Worldwide Taxons

Example pull request:

This will update<country_slug> to<new_country_slug>.

In Search API:

  1. Create a pull request with a change to the relevant country taxon in config/govuk_index/migrated_formats.yaml
  2. Deploy Search API

In Content Tagger:

  1. View the taxon from the list
  2. Under Tasks go to Edit taxon, and update the base path, internal taxon name, external taxon name and any others with the new country name
  3. Save the draft and publish.

The old slug might still appear as a duplicate in our internal GOV.UK search,


Updating the child taxons linked to the country taxon (“UK help and services in country”) will be a content task.

3. Update Whitehall

Example pull request:

This will update<country_slug>/news.

In Whitehall:

  1. Create a data migration to update the slug and name fields of the WorldLocation table.
  2. Deploy the pull request
  3. Update World Location News
    • Go to the relevant country in World Location News. In the “Details” tab, edit the Title, Mission statement and relevant Featured links.

4. Update Smart-answers

Example pull request:


smart-answers validates country names against the production worldwide API, which is managed by whitehall. So do this after deploying the Whitehall change.

This will update content from pages served by smart-answers such as:

In Smart-answers:

  1. Create a pull request that replaces all instances of country_name with new_country_name.

  2. Check changes are reflected in the affected smart answers

  3. Deploy the pull request

5. Update Email-alert-api

The country’s subscription list(s) title and slug needs to be updated, such as:

  • “Publications related to <country_name>
  • <country_name> - travel advice”
  • <country_name>
  1. Run the rake task data_migration:find_subscriber_list_by_title[title] with the country name to see which subscription lists need to be updated
  2. Run the rake task data_migration:update_subscriber_list[slug,new_title,new_slug] to update the subscription lists


You can test the emails are being sent out correctly in integration and staging by following Receive emails from Email Alert API in integration and staging

6. Remove duplicate search results

In Whitehall run SearchIndexDeleteWorker.perform_async(instance.search_index['slug'], instance.rummager_index)

Failing this, there is a rake task that takes care of this.

This page was last reviewed on 5 August 2020. It needs to be reviewed again on 5 February 2021 by the page owner #govuk-developers .
This page was set to be reviewed before 5 February 2021 by the page owner #govuk-developers. This might mean the content is out of date.