I’ve been working with Moodle for several years now, primarily as part of the SLOODLE project. However, one thing that has always been a source of frustration is how slow Moodle often seems on my local Windows Vista PC in work (sadly, I don’t have the option of upgrading to Win7). As it turns out, the performance problem was entirely caused by where I had placed my “moodledata” folder, and there is any easy solution.
The advice that is always given is to keep the “moodledata” folder away from your webserver folder. This is to ensure that nobody can access the data directly — it can only be accessed via Moodle. On my public server, I pay close attention to this, as everybody should, because it’s an important security point (albeit not possible on all webservers). However, for my test installations on my local machine, I have a tendency to keep the data folder alongside the main Moodle folder, for ease of access when necessary. Nobody can access it from outside my PC, and there’s no sensitive data, so securing the installation isn’t important.
As it turns out, that’s actually the cause of my performance problem. It seems that Moodle automatically checks to see if the data folder is web-accessible. This is a great feature for ensuring admins have secure installations, but something about this check seems to go very slow on Windows Vista, and it sometimes seems to break installation/upgrade of Moodle and its modules.
I’ve never had the same problem on Win XP or 7, despite using the same webserver configuration. As such, I suspect it’s somehow related to the Vista file permissions system or User Access Control, which have caused a number of problems for other software. Even setting the moodledata folder to be fully accessible by all users didn’t solve the problem.
Put simply, what’s the solution? Just make sure your moodledata folder is not directly web-accessible. For example, if you keep your Moodle folder here:
Then you should keep your moodledata folder here:
The exact paths will vary from one webserver configuration to the next (I use WampServer, which I find very effective). The principle is this: if “www” is your webserver folder, then put moodledata above it. That should resolve the performance issue, seemingly because Moodle will no longer be able to test its web-accessibility.