Moodle config.php changes after server migration

Asked by:
jtrummp
Time:
2012-05-03 5:13 pm
Category:
Moodle
Hits:
5,277
I just transferred my website to webhosting hub. I have a Moodle installation in a sub-directory (www.celestialacademy.com/ecpa). I can't get the moodle site to work. I think it has something to do with needing to adjust the config.php file settings in the moodle directory.

What should the new settings be (wwwroot, dirroot and dataroot) to be compatible with webhosting hub?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

arnelc
2012-05-03 7:08 pm
There are several things to consider when moving Moodle to a new server, and you have hit upon 3 of the most important items. Paths are based on your account.

The default web root for the Primary domain on your account would be: public_html

If you have installed Moodle to the subdirectory, then the path would be:

/public_html/ecpa/


The path is typically based on the user name and would look like this:

/home/celest18/public_html/ecpa/

The database server is typically set to "localhost."

If you need to reference the database, MySQL databases are normally prefixed by the user name. You can see this by logging into you Cpanel and then going to MySQL databases.

The name for your database will begin with "celest18_"


I hope this helps to answer your question. If you continue to have problems with your Moodle installation, please respond to this post, or contact technical support for further assistance.

Arnel C.

You must login before you can post a comment about this answer.

0

bradm
2012-05-04 6:50 pm
Hi jtrummp,

I was able to dig into this a little further, and I wanted to post another answer here and let you know what I've found out.

When I visit www.celestialacademy.com/ecpa, I get a 404 error. This is because the folder's permissions were 777, and instead should be 755.

When I changed the folder permissions to 755, this resolved the 404 error and instead we saw this error:

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

Looking at your config.php file and comparing with the settings in our own config file for Moodle, it looks like the problem is where you are specifying your moodledata folder.

I didn't see a moodle data folder, so I created this in your account:
/home/your-user-name/moodle-data (which is in the same folder as your public_html). We then adjusted your config file to read:

$CFG->dataroot = '/home/your-user-name/public_html/ecpa/moodledata';

This resolved the error, however moodle then gave us a message that stated some files were missing and it wanted to upgrade.

After scanning your account, we didn't find a folder named moodledata (other than the one we created).

I believe that you will need to find that folder again on your old host and then use ftp to copy it to our servers. That hopefully should resolve the issue at hand.

Feel free to post any further follow up questions in the comments at the bottom of this page, we're more than happy to help further!

Thanks,
- Brad

You must login before you can post a comment about this answer.

Like this Question?

Have a Question?

If you need some help, submit your question to our Community! We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)

Recent Questions

  1. Add a note field to order page in Prestashop 1.5
  2. how to make new website with single account.
  3. Site under brute force attack

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.