Home > Software design >  Is there any one explain me how to exactly specify custom directory path in Plesk server?
Is there any one explain me how to exactly specify custom directory path in Plesk server?

Time:12-03

I want to move moodle lms from local server to live server, I moved moodeldata to httpdocs and tired to figure out httpdocs directory path on shared Linux based Plesk server. I appreciate any one helps me!

I tried like this

$CFG->dataroot='\httpdocs\moodledata';

but the result is

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

CodePudding user response:

On Linux, they should be forward slashes

$CFG->dataroot = '/moodledata';

Also, its a really bad idea to put the data root in a web directory (httpdocs) that's publicly available - put the data root in a directory that's outside of the web root

https://docs.moodle.org/401/en/Installing_Moodle#Create_the_.28moodledata.29_data_directory

If you are migrating, then you probably need to backup the old data root too

https://docs.moodle.org/401/en/Moodle_migration#Copy_moodledata_from_the_old_server_to_the_new_server

CodePudding user response:

Thanks all for your help! And now I changed as

  1. $CFG->dataroot ='/data/www/example.com/moodledata'; then
  2. I moved moodledata from httpdocs to home-directory and it worked correctly.
  • Related