Subsite site URL gets changes automatically

site_url in the database for subsite gets changed when a user tries to log in to their site after registration. It gets replaced with my main site URL.

  • Kewin
    • Flash Drive

    Hello Kasia
    Thank you for your answer the problem is that since the migration on your hosting a technician to migrate the site and rewrite the URLS for the site to work however the problem is that each minisite created has at creation it is 2 dedicated URLS in the database options table and when the client connects for the first time the url “site_url” changes automatically with the url of the main site can you help me please my clients are starting to be impatient and I have lost sales since. thanks in advance. I hope you can fix it today

  • Patrick Freitas
    • FLS

    Hi Kewin

    Hope you are doing well.

    Yes, it is possible, you can see the note on the WordPress documentation:

    https://wordpress.org/support/article/changing-the-site-url/#relocate-method

    Note: When the RELOCATE flag is set to true, the Site URL will be automatically updated to whatever path you are using to access the login screen. This will get the admin section up and running on the new URL, but it will not correct any other part of the setup. You’ll still need to alter those manually.

    Important! Leaving the RELOCATE constant in your wp-config.php file is insecure, as it allows an attacker to change your site URL to anything they want in some configurations. Always remove the RELOCATE line from wp-config.php after you’re done.

    Let us know if you need any further help on this.
    Best Regards
    Patrick Freitas