Return to Snippet

Revision: 67271
at September 3, 2014 01:01 by 108Bits


Initial Code
// Update the Site & Home URL in the database (wp-options table)
// Remove after the database has been updated
update_option('siteurl', 'http://www.yournewsite.com/' );
update_option('home', 'http://www.yournewsite.com/' );

Initial URL

                                

Initial Description
Add the code below to change the Home & Site URL that is configured in the database (wp-options table) by WordPress. Whenever you copy/move a site to a new hosting and the URL has changed you can use the code below to fix any strange redirects that might happen. 

- Insert code to wp-loging.php 
- Add your new url. 
- Surf to www.yoursite.com/wp-login.php 
(site & home url is now updated) 
- Remove code from wp-login.php again

Initial Title
Admin Fix for WordPress

Initial Tags
url, database, wordpress, update

Initial Language
PHP