How to move Moodle to a new folder on the same server

How to move Moodle to a new folder on the same server

by Rowan Wittels -
Number of replies: 4

Hi. I unpacked Moodle (MoodleWindowsInstaller-latest-403.zip) in my user profile on a Windows server (C:\Users\[username]\Downloads\MoodleWindowsInstaller-latest-403).

The site is now fully functional, in a dev state, and I need to move it out of my user profile onto the C drive. I know it was a terrible idea but at the time I was just testing if I could get the site working and one thing led to another...
The site is running on XAMPP which came with the package.

Is there any advice or a link to a good article on how to do this?
My thoughts are perhaps I just backup and shutdown the current site and do a fresh install/unpack on C and restore the database and Moodledata folder? 
I believe that there may be some links to the document root written in the database which will need to be changed. Is this correct?

Any advice will be appreciated.

Average of ratings: -
In reply to Rowan Wittels

Re: How to move Moodle to a new folder on the same server

by Jon Witts -
Picture of Plugin developers Picture of Testers
The Windows Installer version is not intended for production use.

If you have a Windows Server you should look at manually installing Moodle onto your server. TBH there's not a huge amount of people around here running on a Windows Server, as we all tend to be using Linux, Apache, MySQL / MariaDB aand PHP (LAMP) for our servers...

Jon
In reply to Jon Witts

Re: How to move Moodle to a new folder on the same server

by Rowan Wittels -
Thanks for the response.
Sorry, I don't know what "manually installing Moodle" means. I thought that is what I have done. Is there a different download somewhere?
If I set up a Linux server, will I be able to migrate the current site to the Linux installation? Any good resources for this?
In reply to Rowan Wittels

Re: How to move Moodle to a new folder on the same server

by Jon Witts -
Picture of Plugin developers Picture of Testers
Hi there,

To "manually install Moodle" you need to go here https://download.moodle.org/releases/latest/ and download the standard Moodle package in zip format (not the Windows or Mac installer packages). This will give you a download of the files required to install and run Moodle on your own web server. 
 
Before you can do this you will need to have configured a web and database server (they can be on the same physical machine) that meets the requirements to host Moodle. This page in the documentation is a good starting point Installation_quick_guide. It is worth bearing in mind that running your web server correctly is a tricky task which requires time and knowledge. 
 
If you do not have the resources available already or time in which to learn how to run a web server then I would suggest that self-hosting Moodle is not the right route for you...
 
You have the following routes available to get Moodle hosted ready for production use:
  • Self host - Use your own server (either internal or purchased hosting / server) - The caveats mentioned above all relevant here!
  • Employ a Moodle Partner to either host your Moodle for you or to manage your Moodle install on your own server
  • Purchase a course through Moodle Cloud 

The installer packages are really only any good for local development and testing.

HTH
Jon

In reply to Rowan Wittels

Re: How to move Moodle to a new folder on the same server

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I'll try to add a few thoughts to what Jon has provided.

The "MoodleWindowsInstaller-latest-403.zip" includes XAMPP, so if you installed everything in your Downloads folder, you might have two problems: 1) Moving Moodle, and 2) Moving XAMPP. #1 might be easier than #2. I have never succeeded with #2, but I don't tend to run my XAMPP experimental Moodle much.

And as I recall, the installer might default to installing XAMPP in c:\XAMPP. So I am not sure what you did.

However, having said this, I have had success working with MAMP on my Mac, and then moving Moodle (and developed courses) to a production server. But this is more involved than simply dragging and dropping Moodle to another location. To migrate your Moodle to a Linux server, see the Moodle docs "Moodle migration."