{"id":151,"date":"2020-03-07T21:58:50","date_gmt":"2020-03-07T20:58:50","guid":{"rendered":"https:\/\/nissel.it\/?p=151"},"modified":"2020-03-30T16:51:34","modified_gmt":"2020-03-30T14:51:34","slug":"moodle-domain-umziehen","status":"publish","type":"post","link":"https:\/\/nissel.it\/index.php\/2020\/03\/07\/moodle-domain-umziehen\/","title":{"rendered":"Moodle Domain umziehen bzw. Domain \u00e4ndern"},"content":{"rendered":"\n<p>M\u00f6chte man nachtr\u00e4glich die Domain einer Moodle Installation \u00e4ndern, ist es n\u00f6tig einmal den Pfad und Datenbank in der config.php anpassen und zus\u00e4tzlich alle Links in der Datenbank. \u00dcber die PHPMyAdmin Suchfunktion kann man das aufkommen eines Domainnames suchen. Daraus habe ich mir dann SQLs erstellt.<\/p>\n\n\n\n<!--more-->\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/nissel.it\/wp-content\/uploads\/2020\/03\/01-move-moodle.png\"><img loading=\"lazy\" decoding=\"async\" width=\"518\" height=\"680\" src=\"https:\/\/nissel.it\/wp-content\/uploads\/2020\/03\/01-move-moodle.png\" alt=\"\" class=\"wp-image-152\" srcset=\"https:\/\/nissel.it\/wp-content\/uploads\/2020\/03\/01-move-moodle.png 518w, https:\/\/nissel.it\/wp-content\/uploads\/2020\/03\/01-move-moodle-229x300.png 229w\" sizes=\"auto, (max-width: 518px) 100vw, 518px\" \/><\/a><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>update config set `value`=replace(`value`, 'altedomain.de', 'neuedomain.de');\nupdate config_log set `value`=replace(`value`, 'altedomain.de', 'neuedomain.de');\nupdate config_plugins set `value`=replace(`value`, 'altedomain.de', 'neuedomain.de');\nupdate logstore_standard_log set `other`=replace(`other`, 'altedomain.de', 'neuedomain.de');\nupdate messages set `customdata`=replace(`customdata`, 'altedomain.de', 'neuedomain.de');\nupdate mnet_host set `wwwroot`=replace(`wwwroot`, 'altedomain.de', 'neuedomain.de');\nupdate notifications set `subject`=replace(`subject`, 'altedomain.de', 'neuedomain.de');\nupdate notifications set `fullmessage`=replace(`fullmessage`, 'altedomain.de', 'neuedomain.de');\nupdate notifications set `fullmessagehtml`=replace(`fullmessagehtml`, 'altedomain.de', 'neuedomain.de');\nupdate question_categories set `stamp`=replace(`stamp`, 'altedomain.de', 'neuedomain.de');\nupdate enrol_lti_users set `serviceurl`=replace(`serviceurl`, 'altedomain.de', 'neuedomain.de');\nupdate grade_items_history set `itemname`=replace(`itemname`, 'altedomain.de', 'neuedomain.de');<\/code><\/pre>\n\n\n\n<p>Die Anpassungen z.B. in der Tabelle config wenn sich z.B. im Pfad nur der domain Name ge\u00e4ndert hat. \u00c4ndert sich der Pfad komplett, so muss nach dem alten pfad (z.B. \/var\/www\/vhosts\/domain.de) gesucht werden und angepasst werden<\/p>\n\n\n\n<p>Wenn im moodle andere Seiten eingebettet wurden und diese evtl. auch die Domain ge\u00e4ndert haben, muss auch nach diesen domains in der Datenbank gesucht werden. z.:B in den Tabellen lti, enrol_lti_lti2_resource_link usw. Ich habe auch den Inhalt der log Tabellen angepasst aus Unsicherheit etwas zu vergessen.<\/p>\n\n\n\n<p>Ein Besucher der Seite hat mit darauf hingewiesen, dass bei einem normalen Umzug einer Moddole Installation von einem Server zu einem anderen, er noch kein Problem feststellen konnte.<\/p>\n\n\n\n<p>Linux: Ubuntu 18.04.4<br>Plesk: Obsidian 18.0.24<\/p>\n\n\n\n<p> Quellen: <a href=\"https:\/\/betterstudio.com\/blog\/search-and-replace-phpmyadmin\/\">https:\/\/betterstudio.com\/blog\/search-and-replace-phpmyadmin\/<\/a><br><a href=\"https:\/\/docs.moodle.org\/22\/en\/Moodle_migration\">https:\/\/docs.moodle.org\/22\/en\/Moodle_migration<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>M\u00f6chte man nachtr\u00e4glich die Domain einer Moodle Installation \u00e4ndern, ist es n\u00f6tig einmal den Pfad und Datenbank in der config.php anpassen und zus\u00e4tzlich alle Links in der Datenbank. \u00dcber die PHPMyAdmin Suchfunktion kann man das aufkommen eines Domainnames suchen. Daraus habe ich mir dann SQLs erstellt.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[6],"class_list":["post-151","post","type-post","status-publish","format-standard","hentry","category-webserver","tag-moodle"],"_links":{"self":[{"href":"https:\/\/nissel.it\/index.php\/wp-json\/wp\/v2\/posts\/151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nissel.it\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nissel.it\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nissel.it\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nissel.it\/index.php\/wp-json\/wp\/v2\/comments?post=151"}],"version-history":[{"count":8,"href":"https:\/\/nissel.it\/index.php\/wp-json\/wp\/v2\/posts\/151\/revisions"}],"predecessor-version":[{"id":205,"href":"https:\/\/nissel.it\/index.php\/wp-json\/wp\/v2\/posts\/151\/revisions\/205"}],"wp:attachment":[{"href":"https:\/\/nissel.it\/index.php\/wp-json\/wp\/v2\/media?parent=151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nissel.it\/index.php\/wp-json\/wp\/v2\/categories?post=151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nissel.it\/index.php\/wp-json\/wp\/v2\/tags?post=151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}