Replacing Contents of One Domain with Contents of Another


#1

Not sure if I’m thinking of this in a more complicated way than is necessary. What I want to do is very simple, but I couldn’t find anyone else with a similar question (apologies if it was staring me right in the face!).

Here’s what I want to do:

I have existing site at, let’s say, www.existingsite.com.

I want to start a new site at, say, www.testing.existingsite.com, using Wordpress, so I’ll be installing Wordpress there.

Then, after having the two sites run side-by-side for a while, I want to replace the stuff at www.existingsite.com with the stuff at www.testing.existingsite.com.

How do I do that?

Many thanks,

David


#2

Assuming you’re not worried about trying to merge comments or anything…

Build out testing.existingsite.com and get it all set up as you want.

When you’re ready, change the Databases. Change the home/site URLs on testing.existingsite.com and search/replace the wp_posts table changing testing.existing… with existing…

Then edit the exisitingsite.com/wp-config.php file to use that Database.

And drink beer :slight_smile:


#3

If your sites are hosted with DH, and you want them up side-by-side, here’s what you can do:
Work on test.existingsite.com like normal. Then once the time comes, you can rename the existingsite.com directory to something like old.existingsite.com, then log into the WP dashboard of test.existingsite.com and change the URL settings to existingsite.com, and then rename the test.existingsite.com directory to existingsite.com

Then voila! The test site should be live at existingsite.com!


#4

Thanks Elle S and Ipsenu! So, it doesn’t matter that Wordpress will be installed on the “test” domain and not the “existing” domain? I have no idea what Wordpress installs, exactly. Does it basically create a bunch of templates, which you then modify, and move wherever you want?


#5

WordPress installs a bunch of PHP files, some of which are your theme templates, but also a database.

It occurred to me that there’s a simpler way actually. Install WordPress in a folder off example.com (like at example.com/wp )

Make it look like you want to, all pretty and with all your posts and get it looking right and then follow these directions: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install


#6

Very cool, thanks!