• I recently had to change the domain name on a WordPress site and to get the site to come back up, had to add the code below to the functions.php file in the child theme.

    update_option(‘siteurl’,’http://example.com’);
    update_option(‘home’,’http://example.com’);

    So the WordPress tutorial said you have to remove it.
    Is this really necessary or what happens if you keep it there?
    I did remove it, it seemed like the site hung up and you had to keep doing a hard refresh. No issue if I leave the code in the functions.php file.

    Thanks!

Viewing 1 replies (of 1 total)
  • Nothing happens if you keep it there other than every time your site loads, it re-updates the options. It’s just an unnecessary query that gets run every page load.

    To my knowledge all that line does is update the appropriate row in the database table.

Viewing 1 replies (of 1 total)
  • The topic ‘Removing update option from Functions.php’ is closed to new replies.