Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Please can someone help me to clarify what issues i might have when the hosting company changes the DNS settings to point away for the current old site (basic html) and to the new WordPress version of the web site?

Both sites are with the same hosting company (I cannot change hosts or hosting names now, my client and the hosting company are long term business partners). I think the server that the current live website is unable to host WordPress. So they set up another server for WordPress and called it something completely different.

Old website address http://www.therealwebsitename.co.uk

Current Location of new WordPress site on hosting server: http://test.blahsystems.co.uk

I think this bit is important!! The new website is on a Windows Server and uses pretty perma links and also the .html pages plugin. There are also some redirects going to 7 pages on the old site. Everything is currently working ok.

Next week the hosting company are going to change the DNS settings to point to the new website http://test.blahsystems.co.uk which will then hopefully become the live site with the new address of http://www.therealwebsitename.co.uk

The hosting company have also said that I should not have used Permalinks at the moment because once the DNS is pointed to the new site the links will have become permanent (well I had already set up permalinks before they told me). I have not used the full address when making any links within the site.

Will the 'Find & Replace' plug-in on the database still work ok to make any required changes? I am confused as to how the DNS change actually works, will this affect what the links are called in the database or can I still change them from: http://test.blahsystems.co.uk to http://www.therealwebsitename.co.uk

I presume I will need to change the Word Press address and site address in the settings panel to http://www.therealwebsitename.co.uk once the DNS propagation has finished.

Very long winded I know but any help would be much appreciated.

Thanks

share|improve this question

2 Answers 2

Old question, but for the record:

Provided that you adjust the WP_HOME and WP_SITE urls appropriately, the page links should work just fine when you migrate.

An easy way is to add the following lines to your wp-config.php file after uploading the site to therealwebsitename.co.uk:

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

You'll then be able to then login to wp_admin and in Settings>General change the values. This will update the database, then you can remove the two lines you added from wp-config.php.

Media is a different story, depending on how you've set up Wordpress. I use the great Search Regex plugin to go through the database and change all references to old media, and switch them to new:

  1. You're migrating your site, so you already have a DB backup
  2. Go to Admin > Media > Library and Edit an image
  3. copy the File URL on this page
  4. trim this URL so that you have something like test.blahsystems.co.uk/wp-content/ (you don't want the http:// or anything after wp-content/)
  5. Go to Tools > Search Regex and enter this URL into the search field
  6. in the replace field enter the adapted URL, something like: therealwebsitename.co.uk/wp-content/ (make sure that the slashes on the end match)
  7. hit Replace. This will preview the operation, and no change will be made until you hit Replace & Save.
  8. Compare the previewed operation and check that it looks correct, then Replace & Save!
  9. Test the links - generally works flawlessly first time, but fiddling is no less painful. (note that some themes may put links in excerpt as well - you may need to repeat this operation with Source set to Post Excerpt)

Search Regex Preview

A separate issue that your host may be referring to may involve mapping your old sitemap to the new, so that your don't lose link juice. An easy way to manage this issue is with the plugin Redirection by Urban Giraffe. As a bonus, it can auto add redirects for you if you change any page slugs subsequently.

Hope it helps someone :)

share|improve this answer

See Changing Site URL in Codex for various approaches to the operation.

Basically WP tries to keep links very portable, so it is usually no issue just to swap/configure new URLs.

If you encounter issues accessing site under new URL you should try RELOCATE method (see docs) or just make changes to database directly.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.