Installation help

Accidently deleted public_html - best thing to do?

 
 
Picture of Rick Jerz
Re: Accidently deleted public_html - best thing to do?
Group Particularly helpful Moodlers

Melissa, your solution (as provided by Howard and Ken) is essentially what you would do when upgrading Moodle.  No need to touch the mySQL database, no need to do anything with the moodledata folder.  However, there may be one important piece missing, your config.php file (normally in ../public_html/moodle), which contains information about your database, and moodledata.  So you might still need to rebuild this by hand, which should not be too hard.

The fresh copy of moodle will include an example of config.php that is pretty good as a starting point.

 
Average of ratings:Useful (1)
Picture of Visvanath Ratnaweera
Re: Accidently deleted public_html - best thing to do?
Group Particularly helpful Moodlers
The prescribed method is called http://docs.moodle.org/en/Site_backup. Since there was none so far, this is the best occasion to start one. Put a copy of $moodledata and a database dump aside, before you do anything.
 
Average of ratings: -
Picture of Ken Task
Re: Accidently deleted public_html - best thing to do?
Group Particularly helpful Moodlers

Very good point, Rick!  

Using the config-dist.php of the 1.9.19 downloaded code might need the following:

$CFG->dbtype    = 'mysql';
$CFG->dbhost    = 'localhost';  remotely hosted might have an IP address here
$CFG->dbname    = 'name_of_database_for_moodle';
$CFG->dbuser    = 'user_that_has_full_access_rights_to_moodle_db';
$CFG->dbpass    = 'password'; in clear text
$CFG->prefix    = 'mdl_';
$CFG->wwwroot   = 'http://urltomoodle'; (no trailing slash)
$CFG->dirroot   = '/path_to_code/moodle';
$CFG->dataroot  = '/path_to/moodledata';

The other item which might prove problematic depending IF your site had it ... password salt.

$CFG->passwordsaltmain = 'stringoflettersnumberssymbols';

The password salt line not present/used in versions of 1.9 prior to 1.9.6.   Anything higher might have used salted passwords.   Can't just invent one IF you had => 1.9.7.   All users passwords were not only md5 but had their passwords 'salted' using the value of the 'salt'.

Might help to know what OS and who host the site for you.

'spirit of thinkering', Ken

 
Average of ratings:Useful (1)
Picture of Melissa Benson
Re: Accidently deleted public_html - best thing to do?
Group Testers

Thanks everyone. My host was finally able to go back to what we had. I'm afraid if I do an upgrade it might cause over issues. We're starting fresh on a Moodle 2 install asap smile

 
Average of ratings: -
Picture of Rick Jerz
Re: Accidently deleted public_html - best thing to do?
Group Particularly helpful Moodlers

On many hosted servers, you can have more than one install of Moodle (if you do the install yourself, no one-click install).  So you can keep your current version, and then install another version (like 2.x) based upon your servers php and mysql versions.

It is still a good time to backup your database and moodledata components.

 
Average of ratings: -
Sketch...
Re: Accidently deleted public_html - best thing to do?
Group Particularly helpful Moodlers

But you MUST backup the database and moodledata folder!  smile

 
Average of ratings: -