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 moodle breaks during database upgrade saying "database table already exists", you basically have no choice but to drop that table. My suggestion is to backup the database first: mysqldump moodle > moodle.sql Then use vi editor to locate that table and save that code separately. Obviously if the table is empty it doesn't matter. To find out if the table is empty, go back into mysql and type use moodle; select * from tablename; If it returns zero results, you are in luck, you can just drop the table: drop table tablename; But if it contains some stuff, then you have to save it and reload it later using mysqldump and then mysql. Something like this: Assuming you've saved it as shown above and assuming you've kept only the SQL of that table; mysql moodle < mytablesql.sql Anyway, back on to the point. Once you have dropped the table, go back to the installer webpage, click in the URL bar where it shows the moodle webserver address, and just press Enter. Do n...