Changing the site URL
To change the site URL for a Moodle installation, follow these steps:- Access your account using SSH or cPanel.
- Using the command line or cPanel File Manager, navigate to the directory where Moodle is installed.
- Using your preferred text editor, open the config.php file.
- Locate the line in the file that begins $CFG->wwwroot.
- Update the corresponding value with the new site URL. For example:
- Save your changes to the config.php file. The new site URL is now active.
More information
- To view the official online Moodle documentation, please visit https://docs.moodle.org.
- To view documentation about Moogle migrations, please visit https://docs.moodle.org/38/en/Moodle_migration.