Wordpress - multiple domain names for one site

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?
Who is Participating?
Jason C. LevineNo oneCommented:
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.
ImpressionistAuthor Commented:
Thanks, I will try that now.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.