1// add these 2 lines to your wp-config.php,
2// exactly before requiring wp-settings.php
3define( 'WP_HOME', 'http://localhost/site' );
4define( 'WP_SITEURL', 'http://localhost/site' );
5// NOTE: you'r overriting the homeurl locally, without changing the value in DB.