Skip to content

Devi Sri Mari Blog:: Web Technology Trends, News, and Social Media

Menu
  • About Me
  • CONTACT US
  • Sample Page
  • WEB DEVELOPMENT
Menu

How to change a WordPress site URL

Posted on January 25, 2014

wordpressl
If  you may want to change the URL of your WordPress site.

The function provided by the WordPress developers to change the site url is “update_option”.

Simply add these lines to the functions.php file of your theme:

update_option(‘siteurl’,’http://www.new-siteaddress.com’);

update_option(‘home’,’http://www.new-siteaddress.com’);

Then simply load your site from its new location – it should work just fine.

Note that after you run your site once and you make sure it works you should delete those lines from your functions.php file. The settings are already stored in your database and should not be modified each time your site is loaded.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • “Who needs Superheros when there is a Real hero and she is called as Mother”
  • Improve Your Business Behind Social Media
  • Single-Page Application Benefits and How it Works
  • World Sparrow Day
  • Google’s ‘Mobilegeddon’ Will Affect Search Results
  • How To Use Google’s New Blocked Resources Report
  • Wikipedia Lists Ten Most Edited Pages Of 2014
  • Google Is Shutting Down The Google Earth API
  • Google Maps App Adds Real-Time Weather & Facts
  • Google Maps App Gets Design Revamp
©2025 Devi Sri Mari Blog:: Web Technology Trends, News, and Social Media | Design: Newspaperly WordPress Theme