An alternative to the already mentioned solutions would be to setup a virtual host on the production machine, something like test.yourdomain.com
and copy the database to a test database.
Then you could test your site on the live server in a test environment and you would only have to change your db connection settings in the test version.