{"id":1538,"date":"2021-01-18T16:05:47","date_gmt":"2021-01-18T16:05:47","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/add-new-region-for-specific-country-in-magento-2\/"},"modified":"2025-07-17T10:07:34","modified_gmt":"2025-07-17T04:37:34","slug":"add-new-region-for-specific-country-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/add-new-region-for-specific-country-in-magento-2\/","title":{"rendered":"How to Add New Region for Specific Country in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Magento 2\u00a0store owner requires customers\u2019 address for shipping the ordered items.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, while creating a new customer account before ordering anything, it is good to get customers\u2019 address data upfront so that they can quickly place the orders once the items are selected.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Moreover, it may happen that it is important to have the customers\u2019 region data even for downloadable products in order to apply the tax according to region-specific rules.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For such address requirements, the default Magento 2 offers the database from which a customer can select their country, state, or city from the frontend.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, a developer may require to&nbsp;<em><strong>add new region for specific country in Magento 2<\/strong><\/em>&nbsp;database when a new region is created or it may be missing from the database for some reasons.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this scenario, simply follow the below solution and let the customer select their region while creating a new account or placing an order in Magento 2 store:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Method to Add New Region for Specific Country in Magento 2:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run the below SQL query:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO directory_country_region(country_id, code, default_name) VALUES (\"country_code\",\"region_code\",\"region_name\");<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example, I want to add a new region \u201cLadakh\u201d for India as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2021\/01\/Add-New-Region-for-Specific-Country-in-Magento-2-1024x588.png\" alt=\"Add New Region for Specific Country in Magento 2\" class=\"wp-image-12781\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The above example can be implemented with the below SQL query:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO directory_country_region(country_id, code, default_name) VALUES (\"IN\",\"Leh\",\"ladakh\");<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, do share the post with Magento Community via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento 2\u00a0store owner requires customers\u2019 address for shipping the ordered items. Also, while creating a new customer account before ordering anything, it is good to&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1538","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1538"}],"version-history":[{"count":2,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1538\/revisions"}],"predecessor-version":[{"id":14550,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1538\/revisions\/14550"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}