{"id":1152,"date":"2018-09-26T09:29:35","date_gmt":"2018-09-26T07:29:35","guid":{"rendered":"https:\/\/www.ub.edu\/tecnicweb\/?p=1152"},"modified":"2020-05-18T17:56:29","modified_gmt":"2020-05-18T15:56:29","slug":"migrar-wordpress-de-http-a-https-en-lhostatgeria-web-de-la-ub","status":"publish","type":"post","link":"https:\/\/www.ub.edu\/tecnicweb\/migrar-wordpress-de-http-a-https-en-lhostatgeria-web-de-la-ub\/","title":{"rendered":"Migrar WordPress de HTTP a HTTPS en l&#8217;hostatgeria web de la UB"},"content":{"rendered":"<p>Per migrar WordPress de HTTP a HTTPS en l&#8217;hostatgeria web de la UB s&#8217;han de fer els seg\u00fcents passos:<\/p>\n<p>&#8211; Demanar migrar la nostra url de HTTP a HTTPS contactant amb el <a href=\"http:\/\/pau.ub.edu\/maiub\/\">P.A.U<\/a>. (<a href=\"mailto:pau@ub.edu\">pau@ub.edu<\/a>, 93 402 16 87<\/p>\n<p>&#8211; Fer una c\u00f2pia de seguretat del nostre espai i la Base de Dades MySQL<\/p>\n<p>&#8211; Modificar el wp-config de l&#8217;arrel del nostre espai web les dues linies de definici\u00f3 de WP_HOME i WP_SITEURL substituint HTTP per HTTPS,<\/p>\n<p>(en cas de que no apareguin afegir-les justament abans de la linea que posa<\/p>\n<p>\/\/ Aix\u00f2 \u00e9s tot, prou d&#8217;editar &#8211; que bloguis de gust! )<\/p>\n<p>Aix\u00ed, per exemple, seria<\/p>\n<p><code>define('WP_HOME', 'https:\/\/www.ub.edu\/tecnicweb');<br \/>\n<\/code><code>define('WP_SITEURL', 'https:\/\/www.ub.edu\/tecnicweb');<\/code><\/p>\n<p>&#8211; Afegir les seg\u00fcents l\u00ednees en el mateix fitxer wp-config, justament a sota de les anteriors:<br \/>\n<code><br \/>\ndefine('FORCE_SSL_ADMIN', true);<br \/>\ndefine('FORCE_SSL_LOGIN', true);<br \/>\nif ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')<br \/>\n$_SERVER['HTTPS']='on';<br \/>\n<\/code><br \/>\n&#8211; Modificar la URL en tota la base de dades canviant la nostra URL antiga HTTP per la nova amb HTTPS. Per fer aix\u00f2 es pot utilitzar el plugin <a href=\"https:\/\/es.wordpress.org\/plugins\/better-search-replace\/\">Better Search Replace<\/a><\/p>\n<p>&#8211; Comprobar que la migraci\u00f3 s&#8217;ha realitzat amb \u00e9xit<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Per migrar WordPress de HTTP a HTTPS en l&#8217;hostatgeria web de la UB s&#8217;han de fer els seg\u00fcents passos: &#8211; Demanar migrar la nostra url de HTTP a HTTPS contactant amb el P.A.U. (pau@ub.edu, 93 402 16 87 &#8211; Fer una c\u00f2pia de seguretat del nostre espai i la Base de Dades MySQL &#8211; Modificar [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[34,37,72],"class_list":["post-1152","post","type-post","status-publish","format-standard","hentry","category-general","tag-cms","tag-wordpress","tag-https"],"_links":{"self":[{"href":"https:\/\/www.ub.edu\/tecnicweb\/wp-json\/wp\/v2\/posts\/1152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ub.edu\/tecnicweb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ub.edu\/tecnicweb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ub.edu\/tecnicweb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ub.edu\/tecnicweb\/wp-json\/wp\/v2\/comments?post=1152"}],"version-history":[{"count":5,"href":"https:\/\/www.ub.edu\/tecnicweb\/wp-json\/wp\/v2\/posts\/1152\/revisions"}],"predecessor-version":[{"id":1252,"href":"https:\/\/www.ub.edu\/tecnicweb\/wp-json\/wp\/v2\/posts\/1152\/revisions\/1252"}],"wp:attachment":[{"href":"https:\/\/www.ub.edu\/tecnicweb\/wp-json\/wp\/v2\/media?parent=1152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ub.edu\/tecnicweb\/wp-json\/wp\/v2\/categories?post=1152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ub.edu\/tecnicweb\/wp-json\/wp\/v2\/tags?post=1152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}