Wordpress - multiple domain names for one site

Posted on 2012-08-20
Last Modified: 2012-08-22
We have started using wordpress for a couple of company sites. We have encountered a problem once we redirected a second domain name to the host.

First we setup the site with a temporary domain, when it was ready we redirected the two domains we have for it and we stopped pointing the temporary domain to it.

Our first problem is that we can no longer access wp-admin at either of the new domains.

Our second problem is the linking, we thought we used relative linking throughout the site, but we can only get to the home page using both of the domain names, but when we hover over any of the links they are still displaying the temporary domain name.

Can anyone suggest a solution?
Question by:Impressionist
    LVL 70

    Accepted Solution

    When you do as you describe above, you also need to change WordPress so at least one of the new domain names is in the Settings.  You also need to rebuild permalinks and probably should also do a search and replace for the original temporary domain name in the posts table and change all instances there.

    Essentially what you are doing is moving the site without actually moving it.  I describe several steps that you should be taking in this article:

    Look at the steps following the "Export the database" for techniques to change the domain name in the database.  You could dump the whole database out as a text file and search and replace that way or you could use the queries shown in the article.  Either step should restore Dashboard access when run on the wp_options table and the rest of what you describe would either be handled by the other search and replace steps or by disabling and re-enabling permalinks.

    Author Comment

    Thanks, I will try that now.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Now that you've installed WordPress 2.9 ( on your site, you need to install some plugins to get the most out …
    Wordpress Horizontal Drop-Down Menu In this tutorial I will show you had to add a WordPress horizontal navigation menu to your theme. I have searched and searched for a good tutorial on creating a WordPress nav menu without adding a plug-in or us…
    This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
    The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now