Skip to content

Instantly share code, notes, and snippets.

@jsonberry
Created August 11, 2016 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsonberry/93a7382fa8e40aa786e9ab1836858ca5 to your computer and use it in GitHub Desktop.
Save jsonberry/93a7382fa8e40aa786e9ab1836858ca5 to your computer and use it in GitHub Desktop.
Update WordPress Site and Home URL via functions.php
<?php
// When migrating a site the siteurl and home url need to be adjusted
// Add these two update functions to functions.php...
// ..Load the site up...
// ..Verify that everything is working correctly..
// ..Then remove these functions from functions.php
update_option( 'siteurl', 'http://localhost:8888' ); // Be sure Replace the parameter with the correct url
update_option( 'home', 'http://localhost:8888' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment