Support » Fixing WordPress » Change the site URL completely

  • I followed the first method to change the URL in this guide https://codex.wordpress.org/Changing_The_Site_URL

    Edit wp-config.php
    It is possible to set the site URL manually in the wp-config.php file.

    Add these two lines to your wp-config.php, where “example.com” is the correct location of your site.

    define( ‘WP_HOME’, ‘http://example.com’ );
    define( ‘WP_SITEURL’, ‘http://example.com’ );
    This is not necessarily the best fix, it’s just hardcoding the values into the site itself. You won’t be able to edit them on the General settings page anymore when using this method.

    As far as I know, this will not change the URL info in the database. Now, suppose a new plugin is installed and it needs to retrieve the URL info and it uses the info in database, then that would be broken?

    • This topic was modified 1 year, 1 month ago by jgfn.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    You have opened a duplicate topic thats more or less the same one that you posted yesterday.

    Anyway once you change the above code , follow the steps below

    login to WP Admin & install a plugin called “Search and Replace” ,this plugin is used to search & replace the old url value with new url value , once you do it , thats it.

    So this is how you can make sure , the domains are changed successfully.

    Hi, it is not a duplicated topic. It’s another matter. Please read at the end of my topic.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change the site URL completely’ is closed to new replies.