How to change location with url parameters or query string?

While you can change location by using our debugging query strings like this: , the location won't be saved and you will need to add the same string to every request or page your visit.

In order to make the change permanent and also trigger a change in our country dropdown switcher or WPRocket cache you need to add the following code in your theme's functions.php file:

To restore the user location he will need to clear cookies or change the country with the dropdown again, otherwise the plugin will always use geot_country cookie value as country.

Check out our WordPress geolocation solutions
to find out everything you can do!

Start your free trial