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