ASPNetFAQ.com: What is ASP.NET?

Technology posts on ASP.NET, IIS, Windows (+ a little Linux), Cloud Servers, Hosting, and more!
  • Blog Home
Search the site...

Change the WordPress Domain Name After Moving a Site

Tweet
Share
0 Shares

If you’ve recently changed domain names, or made a copy of the site (for testing, development, or any other purpose) then you need to update the domain setting in WordPress. If you don’t, then all links will point back to the old/original domain name and take you away from the new site. You may also (very likely) run into issues trying to sign in to the admin pages of the new site because of domain name mismatching from what WordPress expects.

Looking for the BEST WordPress Hosting?
Read my review of the Best WordPress Hosting or click the banner below to check out SiteGround's plans - starting under $4/month!
Do you already have a site? They'll migrate it for you - FREE!

Web Hosting

The *best* way to change the site’s domain name setting is through the WordPress admin pages. If for some reason you can’t do that, then you can also directly edit the MySQL database. Look at the wp_options table and specifically the record(s) for option_name=’siteurl‘ or option_name=’home‘.

If you can’t access the database you can also manually override the domain setting. To do this locate the wp-config.php file which should be in the root of your WordPress site. Open the file in your favorite text editor and add the two lines below:

define('WP_HOME','http://YourDomain.com/');
define('WP_SITEURL','http://YourDomain.com/');

Obviously you should replace “YourDomain.com” with the actual domain name of the WordPress site.

Happy hosting!

More from my site

  • Manually Remove the W3 Total Cache WordPress pluginManually Remove the W3 Total Cache WordPress plugin
  • Update Your WordPress Database Connection StringUpdate Your WordPress Database Connection String
  • WordPress: Redirect One Domain to AnotherWordPress: Redirect One Domain to Another
  • What makes good web hosting?What makes good web hosting?
  • Convert a Folder to an Application on a Remote IIS HostConvert a Folder to an Application on a Remote IIS Host
Tweet
Share
0 Shares
cytanium, Hosting, PHP, Wordpress

2 comments on “Change the WordPress Domain Name After Moving a Site”

  1. Tiger says:
    January 4, 2013 at 5:47 pm

    You may have to use the script via a database though as some database elements will have the url hardcoded – i.e when you upload images to the system or extra plugins.

  2. sash window repairs says:
    May 5, 2013 at 8:06 am

    Hello Brad Kingsley,
    Thanks, on a related note, My pal has this new domain he acquired from godaddy and he wants to move it to wordpress so he can have this site on wordpress. How a great deal would it price my good friend to hire somebody to do it for him ? Remember to help.
    I look forward to your next post

Proverbs 19:20

"Get all the advice and instruction you can, so you will be wise the rest of your life."

A Note On WordPress Hosting

Our main focus is of course .NET, but with a mix of Linux, virtualization, and other technologies. But if you're really looking for the best WordPress hosting specifically, read my WordPress host review to save yourself hassle AND money!




Recent Posts

  • What makes good web hosting?
  • jQuery Mobile C# ASP.NET and N5 Networks Software Repository
  • Open Source Bug Tracking Software and the Orchard Project
  • ASP.NET Development with Dreamweaver MX: Visual QuickPro Guide
  • Kendo UI Sample, ASP.NET Ajax Tutorial & More

Tags

ASP.NET Automation centos CMS css cytanium Development/Coding Email gmail Hosting htaccess http https IIS javascript Learning Linux logparser MySQL nginx openssl OrcsWeb performance PowerShell redirect RHEL security server SherWeb smtp SQL/Databases ssl System Administration telnet terminal tip Troubleshooting Ubuntu virtualization Visual Studio web farm web hosting Windows windows server Wordpress

Categories

  • ASP.net development
  • Development/Coding
  • Hosting
  • IIS (Internet Information Services)
  • SQL/Databases
  • System Administration
  • Virtualization
(c) ASPNETFAQ.com