While the manual methods given above are the good ways to learn, I personally prefer to use Duplicator plugin for any WP site migration irrespective of server environment. It takes care of lot of that manual stuff.
As for file permissions you might want to go through this WP Hardening codex page.