For anyone interested. That indeed does the trick. Do a global replace in both configure.php files to change the directories, clone the MySQL database and link them up.