Change URL

Change URL

by Jesper Christensen -
Number of replies: 2
Hi

As a newbie I've installed Moodle in http://moodle.domain.xx/moodle/

Now Imm finding out I need to change that to http://moodle.domain.xx/

I've tried to change it in the php.ini filne, but thats not enough.
Is there a "tool" to help fools like me ??




Average of ratings: -
In reply to Jesper Christensen

Re: Change URL

by Paul Verrall -
Hi,


Assuming all your DNS is in place correctly you need to change the $CFG->wwwroot in your Moodle's config.php (you shouldn't have to touch php.ini). If this is a new site without lots of embedded links/content using the old URL this is probably all you need to do.

If you do have lots of embedded content in your site referring to the old domain instructions on how to address this are in the Moodle Miigration docs[1], look under the heading 'Change your Moodle URL'. Please note that this step is ONLY necessary to correct pre-existing content, usually present when you have been running a site for some time already; I only really mention it here for completeness.


[1] https://docs.moodle.org/29/en/Moodle_migration

In reply to Jesper Christensen

Re: Change URL

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

1.  You need to change it in your Moodle config file.

2.  You to run the Replace tool to replace the old url with the new url in the database.  This found at "yoursite"/admin/tool/replace/index.php