The only 'sane' way to do this is to migrate (see Moodle_migration) the entire site to a new instance. Do not think in terms of apply to an empty, clean site. It doesn't work that way. You are simply copying the data you have.
Then delete all the users (using the bulk user functions). That's as close as you will get and is relatively safe.