Caching is not your problem here. The home URL and site URL are stored in the wp_options
table in your database. You can update them either by visiting the Settings > General page in your WordPress dashboard, or you can edit the siteurl
and home
option values directly in the database through an SQL query or a client such as phpMyAdmin.
You can also override any site or home URL option stored in the database by adding the following code to your wp-config.php
file:
define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );
The above code will adjust depending on your domain.