I downloaded the source code and database of a website developed with moodle. I imported the database locally with the same credentials and just modified the configuration file as follows:
<?php // Moodle configuration file
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = 'mariadb';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle_bwv';
$CFG->dbuser = 'bwv_moodle';
$CFG->dbpass = 'bwv_moodle$4$deploy';
$CFG->prefix = '';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => '',
'dbsocket' => '',
'dbcollation' => 'utf8mb4_general_ci',
);
// $CFG->wwwroot = 'https://bildungswerk-vielfalt.com';
// $CFG->dataroot = '/var/www/vhosts/bildungswerk-vielfalt.com/moodledata';
// $CFG->admin = 'admin';
$CFG->wwwroot = 'http://localhost/bildungswerk';
$CFG->dataroot = 'C:\\wamp64\\moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
//added by cesaire to disable login token check
$CFG->disablelogintoken = true;
require_once(__DIR__ . '/lib/setup.php');
Any help would be greatly appreciated.