How to change the Moodle site URL (2024)

This article describes how to change the site URL for a Moodle installation. You may need to do this, for example, if you migrate an existing Moodle installation to a new server. Alternatively, you may want to relocate a Moodle installation to a new directory on the same server.

Table of Contents
  • Changing the site URL
  • More Information

Changing the site URL

To change the site URL for a Moodle installation, follow these steps:

  1. Access your account using SSH or cPanel.
  2. Using the command line or cPanel File Manager, navigate to the directory where Moodle is installed.
  3. Using your preferred text editor, open theconfig.php file.
  4. Locate the line in the file that begins$CFG->wwwroot.
  5. Update the corresponding value with the new site URL. For example:
    $CFG->wwwroot = 'https://example.com/moodle';
  6. Save your changes to the config.php file. The new site URL is now active.

    If you are migrating a Moodle installation, you should check other values in the config.php file and ensure they are correct. For example, verify that the following database and data directory settings are correct:

    • $CFG->dbname: This is the Moodle database name.
    • $CFG->dbuser: This is theusername for the Moodle database.
    • $CFG->dbpass: This is the password for the Moodle database.
    • $CFG->prefix: This is the table prefix used in the Moodle database.
    • $CFG->dataroot: This is the data root directory for the Moodle installation. For security reasons, this directory should not be located under the public_html directory.

More Information

How to change the Moodle site URL (2024)
Top Articles
How Stablecoins Remain Stable
Rock Cairns (U.S. National Park Service)
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
Things To Do In Atlanta Tomorrow Night
Non Sequitur
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated:

Views: 6196

Rating: 4.7 / 5 (77 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.