{"id":456,"date":"2015-03-09T15:21:00","date_gmt":"2015-03-09T14:21:00","guid":{"rendered":"https:\/\/www.nullalo.com\/?p=456"},"modified":"2025-10-22T10:20:29","modified_gmt":"2025-10-22T08:20:29","slug":"wordpress-come-cambiare-url-del-sito","status":"publish","type":"post","link":"https:\/\/www.nullalo.com\/en\/wordpress-how-to-change-site-url\/","title":{"rendered":"WordPress: how to change site URL"},"content":{"rendered":"<p><\/p>\n<p style=\"text-align: justify;\">After installing and using WordPress, some references to the site address specified during the configuration (i.e.: www.example.com) are stored\u00a0in the database.<\/p>\n<p style=\"text-align: justify;\">If you need to <strong>change such address<\/strong> at a later time, you need to perform some steps to avoid references to the old address to persist\u00a0in the\u00a0DB.<\/p>\n<p style=\"text-align: justify;\">Let&#8217;s see what to do, assuming that WordPress was initially configured for the address www.oldsite.com and that you are going to move it on www.newsite.com.<\/p>\n<p style=\"text-align: justify;\">First thing to do is to perform a <strong>database backup<\/strong>, just in case you make mistakes during the procedure.<\/p>\n<p style=\"text-align: justify;\">After we make sure we have such DB backup, we need to launch the following SQL queries on the database\u00a0(obviously\u00a0<strong>www.oldsite.com<\/strong> and\u00a0<strong>www.newsite.com<\/strong> must be replaced with the addresses\u00a0you\u00a0chose):<\/p>\n<pre class=\"brush: sql; gutter: true; title: ; notranslate\" title=\"\">UPDATE wp_options SET option_value = replace(option_value, 'http:\/\/www.oldsite.com', 'http:\/\/www.newsite.com') WHERE option_name = 'home' OR option_name = 'siteurl';\r\nUPDATE wp_posts SET guid = replace(guid, 'http:\/\/www.oldsite.com','http:\/\/www.newsite.com');\r\nUPDATE wp_posts SET post_content = replace(post_content, 'http:\/\/www.oldsite.com', 'http:\/\/www.newsite.com');\r\nUPDATE wp_postmeta SET meta_value = replace(meta_value,'http:\/\/www.oldsite.com','http:\/\/www.newsite.com');<\/pre>\n<p style=\"text-align: justify;\">If after these operations you are no longer able to access website on the new URL address, you probably made some mistake in the first of the four queries. In that case use WordPress\u00a0<strong>relocate<\/strong> di functions, that can be enabled by inserting the following line at the end of the <strong>wp-config.php<\/strong> file:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">define('RELOCATE', true);<\/pre>\n<p style=\"text-align: justify;\">Save the file and open the address\u00a0<strong>http:\/\/www.newsite.com\/wp-login.php<\/strong>, then type in your username ad password, click on Settings-&gt;General\u00a0and make sure that both the lines\u00a0&#8220;<strong>WordPress Address (URL)<\/strong>&#8221; and &#8220;<strong>Site Address (URL)<\/strong>&#8221; contain http:\/\/www.newsite.com as address.<\/p>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>After installing and using WordPress, some references to the site address specified during the configuration (i.e.: www.example.com) are stored\u00a0in the database. If you need to change such address at a later time, you need to perform some steps to avoid references to the old address to persist\u00a0in the\u00a0DB. Let&#8217;s see<\/p>\n","protected":false},"author":2,"featured_media":458,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[6,33],"tags":[35,37,34,36],"class_list":["post-456","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","category-wordpress","tag-migrazione","tag-url","tag-wordpress","tag-indirizzo"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>WordPress: how to change site URL - Nullalo!<\/title>\n<meta name=\"description\" content=\"Dopo aver installato ed utilizzato WordPress, nel database vengono creati dei riferimenti all&#039;indirizzo del sito immesso in fase di configurazione (es.:\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.nullalo.com\/?p=456\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress: how to change site URL - Nullalo!\" \/>\n<meta property=\"og:description\" content=\"Dopo aver installato ed utilizzato WordPress, nel database vengono creati dei riferimenti all&#039;indirizzo del sito immesso in fase di configurazione (es.:\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.nullalo.com\/?p=456\" \/>\n<meta property=\"og:site_name\" content=\"Nullalo!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/nullalo\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/fulvio.sicurezza\" \/>\n<meta property=\"article:published_time\" content=\"2015-03-09T14:21:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-22T08:20:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/03\/wordpress.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1140\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Fulvio Sicurezza\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/FulvioSicurezza\" \/>\n<meta name=\"twitter:site\" content=\"@Nullalo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fulvio Sicurezza\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.nullalo.com\/?p=456\",\"url\":\"https:\/\/www.nullalo.com\/?p=456\",\"name\":\"[:it]WordPress: come cambiare URL del sito[:en]WordPress: how to change site URL[:] - Nullalo!\",\"isPartOf\":{\"@id\":\"https:\/\/www.nullalo.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.nullalo.com\/?p=456#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.nullalo.com\/?p=456#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/03\/wordpress.jpg\",\"datePublished\":\"2015-03-09T14:21:00+00:00\",\"dateModified\":\"2025-10-22T08:20:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c\"},\"description\":\"Dopo aver installato ed utilizzato WordPress, nel database vengono creati dei riferimenti all'indirizzo del sito immesso in fase di configurazione (es.:\",\"breadcrumb\":{\"@id\":\"https:\/\/www.nullalo.com\/?p=456#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.nullalo.com\/?p=456\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.nullalo.com\/?p=456#primaryimage\",\"url\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/03\/wordpress.jpg\",\"contentUrl\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/03\/wordpress.jpg\",\"width\":1140,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.nullalo.com\/?p=456#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.nullalo.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"WordPress: come cambiare URL del sito\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.nullalo.com\/#website\",\"url\":\"https:\/\/www.nullalo.com\/\",\"name\":\"Nullalo!\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.nullalo.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c\",\"name\":\"Fulvio Sicurezza\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.nullalo.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg\",\"contentUrl\":\"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg\",\"caption\":\"Fulvio Sicurezza\"},\"sameAs\":[\"http:\/\/www.generalservice.na.it\",\"https:\/\/www.facebook.com\/fulvio.sicurezza\",\"http:\/\/it.linkedin.com\/in\/fulviosicurezza\",\"https:\/\/x.com\/https:\/\/twitter.com\/FulvioSicurezza\",\"https:\/\/www.youtube.com\/c\/FulvioSicurezzaIT\"],\"url\":\"https:\/\/www.nullalo.com\/en\/author\/f-sicurezza\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress: how to change site URL - Nullalo!","description":"Dopo aver installato ed utilizzato WordPress, nel database vengono creati dei riferimenti all'indirizzo del sito immesso in fase di configurazione (es.:","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.nullalo.com\/?p=456","og_locale":"en_US","og_type":"article","og_title":"WordPress: how to change site URL - Nullalo!","og_description":"Dopo aver installato ed utilizzato WordPress, nel database vengono creati dei riferimenti all'indirizzo del sito immesso in fase di configurazione (es.:","og_url":"https:\/\/www.nullalo.com\/?p=456","og_site_name":"Nullalo!","article_publisher":"https:\/\/www.facebook.com\/nullalo","article_author":"https:\/\/www.facebook.com\/fulvio.sicurezza","article_published_time":"2015-03-09T14:21:00+00:00","article_modified_time":"2025-10-22T08:20:29+00:00","og_image":[{"width":1140,"height":600,"url":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/03\/wordpress.jpg","type":"image\/jpeg"}],"author":"Fulvio Sicurezza","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/FulvioSicurezza","twitter_site":"@Nullalo","twitter_misc":{"Written by":"Fulvio Sicurezza","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.nullalo.com\/?p=456","url":"https:\/\/www.nullalo.com\/?p=456","name":"[:it]WordPress: come cambiare URL del sito[:en]WordPress: how to change site URL[:] - Nullalo!","isPartOf":{"@id":"https:\/\/www.nullalo.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.nullalo.com\/?p=456#primaryimage"},"image":{"@id":"https:\/\/www.nullalo.com\/?p=456#primaryimage"},"thumbnailUrl":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/03\/wordpress.jpg","datePublished":"2015-03-09T14:21:00+00:00","dateModified":"2025-10-22T08:20:29+00:00","author":{"@id":"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c"},"description":"Dopo aver installato ed utilizzato WordPress, nel database vengono creati dei riferimenti all'indirizzo del sito immesso in fase di configurazione (es.:","breadcrumb":{"@id":"https:\/\/www.nullalo.com\/?p=456#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.nullalo.com\/?p=456"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.nullalo.com\/?p=456#primaryimage","url":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/03\/wordpress.jpg","contentUrl":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/03\/wordpress.jpg","width":1140,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/www.nullalo.com\/?p=456#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.nullalo.com\/"},{"@type":"ListItem","position":2,"name":"WordPress: come cambiare URL del sito"}]},{"@type":"WebSite","@id":"https:\/\/www.nullalo.com\/#website","url":"https:\/\/www.nullalo.com\/","name":"Nullalo!","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.nullalo.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.nullalo.com\/#\/schema\/person\/fe9c2885376a6ab076e06461ae1b546c","name":"Fulvio Sicurezza","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.nullalo.com\/#\/schema\/person\/image\/","url":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg","contentUrl":"https:\/\/www.nullalo.com\/wp-content\/uploads\/2015\/02\/Fulvio-Sicurezza_avatar_1424711147-96x96.jpg","caption":"Fulvio Sicurezza"},"sameAs":["http:\/\/www.generalservice.na.it","https:\/\/www.facebook.com\/fulvio.sicurezza","http:\/\/it.linkedin.com\/in\/fulviosicurezza","https:\/\/x.com\/https:\/\/twitter.com\/FulvioSicurezza","https:\/\/www.youtube.com\/c\/FulvioSicurezzaIT"],"url":"https:\/\/www.nullalo.com\/en\/author\/f-sicurezza\/"}]}},"_links":{"self":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts\/456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/comments?post=456"}],"version-history":[{"count":1,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts\/456\/revisions"}],"predecessor-version":[{"id":1971,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/posts\/456\/revisions\/1971"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/media\/458"}],"wp:attachment":[{"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/media?parent=456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/categories?post=456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nullalo.com\/en\/wp-json\/wp\/v2\/tags?post=456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}