Back up the files in the test server.

Simply duplicate or clone the folder and files (copy and paste to a secure location), and export a backup of your database (export from phpMyAdmin or mysql dump from command line then download).

Transfer your Database

Important! Before exporting your database or files, you need to clear or refresh your database. Go to your test site admin backend and refresh Cache by System > System > Cache Management.

Transfer files and folders

Download, save the whole magento shop root directory via File manager or FTP tools. Alteratively, you may zip or compress your root folder first, this way you only need to download and upload later a single, compressed file. 

– Open the backup file you created at step 1 and do Search/Replace all from “devsite.com” to “livesite.com”. Export the magento Database