Table of contents

Rename a country

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

1. Update Foreign Travel Advice publisher

This will update www.gov.uk/foreign-travel-advice/countryname. In Travel Advice Publisher:

  1. Create a pull request with:
  2. A migration to update the relevant country_slug of TravelAdviceEdition. Example
  3. A change of the relevant name and slug in the lib/data/countries.yml file. Keep the same content_id and email_signup_content_id, and ensure the alphabetical order of the list is respected. Example

  4. Deploy Travel Advice publisher Once the above PRs are ready, deploy Travel Advice Publisher. This should be an app:migrate_and_hard_restart deploy as a hard restart is required to update the yml file.

  5. Run rake tasks

  6. Run bundle exec rake publishing_api:republish_edition[new_country_slug] to update the PublishingApi.

  7. Run publishing_api:republish_email_signups:editions to update email subscriptions.

  8. Update the search title In the UI, go to the country, create a new edition, tick “minor update” and update the Search title and Search description fields to ensure search results have the updated name. Save and publish.

2. Update Worldwide Taxons

This will update /world/countryname.

Rename the taxon in the Rummager index list.

Once the Rummager change is deployed, open the relevant country in Content Tagger, tick “minor update” and update all the relevant fields with the new country name. Save the draft and publish.

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

3. Update Whitehall

This will update /world/countryname/news. In Whitehall:

  1. Data migration Create and deploy a data migration to update the slug and name fields of the WorldLocation table. Examples 1 and 2(both changes can be made in one PR)

  2. Update in the UI Go to the relevant country in World Location News and in the “Details” tab edit the Title, Mission statement and relevant Featured links.

4. Update Smart-answers

This will update content from pages served by smart-answers such as marriage-abroad/y/countryname. In Smart-answers:

  1. Find and replace (case sensitive) old_country_name with new_country_name, then Old_country_name with New_country_name. Example

  2. Run bundle exec rake checksums:update

  3. Open and deploy a PR with these changes

This page was last reviewed . It needs to be reviewed again by the page owner #govuk-2ndline.