When your website is ready and you need to move it to the live server, we recommend using the Duplicator Plugin.
It will copy the whole website with the database. It is also an excellent way of storing a copy of your site if anything terrible would happen to it in the future.