{"id":543,"date":"2019-06-15T09:25:40","date_gmt":"2019-06-15T07:25:40","guid":{"rendered":"http:\/\/www.nimbo.it\/?p=543"},"modified":"2020-04-09T08:33:25","modified_gmt":"2020-04-09T06:33:25","slug":"wordpress-aggiornare-host","status":"publish","type":"post","link":"https:\/\/www.nimbo.it\/index.php\/2019\/06\/15\/wordpress-aggiornare-host\/","title":{"rendered":"WordPress aggiornare host"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Se nel passare da un un server ad un altro cambia l&#8217;indirizzo IP o il nome del dominio, non basta ripristinare il database.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">Va aggiornato il file <em>wp-config.php<\/em> con gli eventuali nuovi nome utente e password.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verificare anche se il nuovo host imposta automaticamente un prefisso per le tabelle del database ed eventualmente modificarlo nel wp-config<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Vanno poi aggiornate le tabelle del database che puntano al vecchio indirizzo:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">UPDATE wp_options SET option_value = replace(option_value, 'http:\/\/www.vecchio', 'http:\/\/www.nuovo') WHERE option_name = 'home' OR option_name = 'siteurl';\n\nUPDATE wp_posts SET guid = replace(guid, 'http:\/\/www.vecchio','http:\/\/www.nuovo');\n\nUPDATE wp_posts SET post_content = replace(post_content, 'http:\/\/www.vecchio', 'http:\/\/www.nuovo');\n\nUPDATE wp_postmeta SET meta_value = replace(meta_value,'http:\/\/www.vecchio','http:\/\/www.nuovo');<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Infine ricordarsi di ripristinare sul nuovo server\/host la cartella &#8220;uploads&#8221; che contiene i documenti caricati sul vecchio sito.<\/p>\n\n\n\n<small>fonte: <br>\nhttps:\/\/wpbeaches.com\/updating-wordpress-mysql-database-after-moving-to-a-new-url\/<\/small>\n","protected":false},"excerpt":{"rendered":"<p>Se nel passare da un un server ad un altro cambia l&#8217;indirizzo IP o il nome del dominio, non basta ripristinare il database.<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,36,38],"tags":[50,48],"class_list":["post-543","post","type-post","status-publish","format-standard","hentry","category-linux","category-tipsetricks","category-wordpress","tag-mysql","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.nimbo.it\/index.php\/wp-json\/wp\/v2\/posts\/543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nimbo.it\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nimbo.it\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nimbo.it\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nimbo.it\/index.php\/wp-json\/wp\/v2\/comments?post=543"}],"version-history":[{"count":5,"href":"https:\/\/www.nimbo.it\/index.php\/wp-json\/wp\/v2\/posts\/543\/revisions"}],"predecessor-version":[{"id":578,"href":"https:\/\/www.nimbo.it\/index.php\/wp-json\/wp\/v2\/posts\/543\/revisions\/578"}],"wp:attachment":[{"href":"https:\/\/www.nimbo.it\/index.php\/wp-json\/wp\/v2\/media?parent=543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nimbo.it\/index.php\/wp-json\/wp\/v2\/categories?post=543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nimbo.it\/index.php\/wp-json\/wp\/v2\/tags?post=543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}