migrating moodle from localhost to live server..

migrating moodle from localhost to live server..

by shams Marwat -
Number of replies: 8

Hi !
i have configured moodle on my local XAMP server. added some courses , student , teachers and assigned their roles. now i want it to migrate to  my liver domain.

bt i always fail in doing this .. i follow moodle migrating document but didn't get some of its step so plz dont suggest me that.

i transfer all moodle files to live server and copy the moodledata folder to root of my server. import the database as normal as we do ...

this process show me bullshit errors. all design disturb and show me error.

Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.

my live config.php is

$CFG->wwwroot   = 'http://askshams.com';
$CFG->dataroot  = 'http://moodledata';
$CFG->admin     = 'admin';   // Note : askshams.com is my live domain.

can any one plz let me know where am wrong .. also if u can repeat easy step of migrating .

want to hear frm u ppl soonest.

thanks a million in advance .

shamsi

Average of ratings: -
In reply to shams Marwat

Re: migrating moodle from localhost to live server..

by Luis de Vasconcelos -

Answered in https://moodle.org/mod/forum/discuss.php?d=123975#p1002468

PS Cross-posting the same question in different topics (and swearing) is considered rude...

Average of ratings: Useful (1)
In reply to Luis de Vasconcelos

Re: migrating moodle from localhost to live server..

by shams Marwat -

thanks Luis !

yeh i find my question is some how related to his problem,  that's why i posted their in hope to tag some one who can reply me soon. but i was worrying  as their conversation has ended couple of year ago so start a new thread.  

Ohk Luis i know my $CFG->dataroot value is not correct my question is that how can i made it workable ... also what i do as mentioned in the post is the correct way of migrating moodle ?????????????

thanks

In reply to shams Marwat

Re: migrating moodle from localhost to live server..

by Guillermo Madero -

Shams,

Instead of telling us what not to do... why don't you tell us about the environment in which you want to install Moodle, the Moodle version you are using and the steps of the documentation that you didn't get.

In reply to shams Marwat

Re: migrating moodle from localhost to live server..

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Shams, I am nowhere near an expert on the wide variety of ways that Moodle can be configured, but I noticed in my config.php that my "data root" does not contain "http://...", which leads me to believe that my Moodle knows its location from some of the other parameters.  So when I see your lines in config.php, it makes me wonder if your Moodle is on one server, and your moodle data in on another, or something like this.  I can't offer any specifics about this, but maybe my comments will help direct you to the solution.  Or maybe it is a permissions issue.

Also, I was unsure which "process" shows you errors.  Was it the importing of the database, or the process of starting the Moodle install scripts?

I too have struggled with installing Moodle many years ago, but I found that getting upset did me no good whatsoever.  Moodle is free (of course), so the need to be patient with the learning curve is a given.

Have you considered doing a brand new install first, making sure that a new copy of Moodle works correctly, then overwrite the database and moodledata with the ones you are trying to migrate?

In reply to Rick Jerz

Re: migrating moodle from localhost to live server..

by Frank B -

Your data root does not contain http:// because it should not be an URL. It's a system path to the data, so moodle knows were to store and retrieve files from. Please make sure that your data directory is different and not under your PUBLIC_HTML root.

In reply to Rick Jerz

Re: migrating moodle from localhost to live server..

by Frank B -

"Have you considered doing a brand new install first, making sure that a new copy of Moodle works correctly, then overwrite the database and moodledata with the ones you are trying to migrate?"

That's a very bad idea, unless you are using the exact version of moodle the database and files came from. Otherwise, it will force an UPGRADE situation. There are variations from version to versions in the structure of database and files and you could "in theory" be adding another layer of issues on to this problem.

In reply to Frank B

Re: migrating moodle from localhost to live server..

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Good point, and Shams does not say anything about which versions of moodle are involved.  However, whichever version he wants on his new server he could install (as new) just to make sure everything on his server is configured properly, and then he could delete this "practice" install and proceed with his migration.  As I think more about this, maybe he faces the version issue either way... maybe his migration is between different versions.

Doing the migration with the exact same versions would be his safest route.  Who knows, maybe he is migrating from 1.6 to 2.5, which we know would take some very careful handling.

In reply to shams Marwat

Re: migrating moodle from localhost to live server..

by Frank B -

Just put a new moodle installation on the server(and point it to a new database) and the installation won't proceed without you meeting the server requirements. So as you are meeting the requirements for the new installation , you are fixing them for the current installation. Also, it's alot easier for us to tell you what to do, when the installation is telling you what you are lacking. Once you have your new installation working, your old one should as well; if not then begin comparing your config.php of the new server to the old one. Your paths and database credentials need to be modified to work on this new server.