When you migrate moodle from one server to another, you have to take a copy of three things and make certain changes. There are some caveats however which I will mention here. Moodle has three main parts, the app itself, the database, and the uploads and cache data repository. We are going to assume that the following paths are used by Moodle: /var/www/moodle/ - the app itself, containing folders like "admin, analytics, auth, availability, badges..." and importantly, the config.php file /var/www/moodle_data/ - the app cache data and uploads, containing the folders "cache, diag, filedir, lang, localcache, lock, muc, sessions, temp, trashdir" Let's assume for this example that your database is called moodle , your database username is moodle , and your password is abc123 . Let's also assume your target server allows you to upload files as root over ssh/scp. We divide the instructions up into source server and target server/new server. Let's assume you...
If your site is crashed you need to edit moodle on the command line. Enter Moosh, the moodle shell. To install moosh, do this: sudo apt-add-repository ppa:zabuch/ppa sudo apt-get update sudo apt-get install moosh Then, if you want to use moosh, you can use more or less any command shown in the web interface using a syntax of moosh -n the-command the-parameters for example cd /var/www/moodle/ moosh -n plugin-uninstall someplugin or moosh -n cache-clear note the "cd" part - it won't work unless you do that, as it uses the config file in that directory to login. The -n part means do not ask me about my user id. Normally moodle operates as apache (www-data). Using -n lets you run it as root. Otherwise you have to do something which is in my view, worse, namely enable bash shell for apache. That opens you up to hackers, in my view, as apache is facing the web and accepts uploads on many apps such as wordpress, so it's feasible for someone to hack your server entirely if y...