Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Blogging Forum


You are currently viewing our Blogging Forum as a guest. Please register to participate.
Login



Reply
How to relocate your WordPress site
Old 03-05-2010, 09:49 AM How to relocate your WordPress site
TWD
TWD's Avatar
King Spam Talker

Posts: 1,182
Trades: 0
I had to do this today and it worked so thought I might as well record what I did for posterity. It might help somebody out.

To give some background, I had a WordPress site running the E-commerce plugin on one domain and wanted to create a duplicate of the site onto a different domain.

Here is what I did:

1. Copy the entire wp-content directory from "www.old-domain.com" onto my desktop. This directory contains theme files, plugins and uploads.

2. Download a copy of the .sql file containing ALL the Wordpress tables from "www.old-domain.com". Since I was running the WP-DB plugin it was a case of just going to my email box and finding the most recent tarball copy of the database that the system sent to me. Downloaded this and unzipped it on my desktop. You could do the same thing with CPanels backup facility. Talk to your hosting company if you are unsure.

After steps 1 and 2 you now have all the raw material you need to re-establish you blog on it's new home.

3. Go to "www.new-domain.com" and install a fresh Kubrick themed installation of WordPress. In my case I was able to use my hosting company's Simple Scripts to do a fresh WP install in a matter of minutes.

4. Delete the existing wp-contents folder in "www.new-domain.com" and upload the wp-contents from your desktop. Now log into your WordPress dashboard.
You should see all your plugins from "www.old-domain.com" and all your themes as well. Go ahead and activate all your plugins and activate whatever theme you were using in "www.old-domain.com"
NOTE: At this stage your login will be whatever WP login password you were given for "www.new-domain.com" when you did the fresh install.

5. Go to your hosting company CPanel in "www.new-domain.com" and look for the phpMyAdmin icon. This is an awesome tool for poking around in your databases. Open it up. In the top left you will need to locate your database. If it is a fresh domain it will probably be the only one. It might say "_wrd01" or something like that. Make sure it is the right database! Down the left side you will see a list of tables. Click on the table that says "wp_posts". You should see a "Hello World" post and that's about all. It means you have the fresh database. You are going to now overwrite this.

6. Go to the phpMyAdmin tab titled "Import". Use the file browse field to find the unzipped sql file from step 2 on your desktop. Import it. Some people might recommend dropping all your database tables first. But any existing tables will be overwritten by tables of the same name so its probably unnecessary in this context.

7. This next step might look a bit scary but its not really that bad.
Click on the phpMyAdmin tab titled "SQL".
Enter the following commands (replace with your relevant domain names) and click Go.

Code:
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
then enter this (replace with your relevant domain names) and click Go.

Code:
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
finally enter this code (replace with your relevent domain names) and click Go.

Code:
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
8. Check your "www.new-domain.com" front end. All your blog posts from the old site should be there. If you have some hard coded absolute links in your sidebar widgets or footer (as I did) you might need to amend those. Remember that to log into your WP Dashboard now you will be using whatever the login was at "www.old-domain.com". At least until you decide to change it.

9. Crack open a beer. You are done!


NOTE:In the examples we have seen how it works transferring from a the root folder of one site to the root folder of another site but exactly the same process will still work with sub-folders. For example you could substitute "www.old-domain.com/myfolder" and "www.new-domain/yourfolder" into the above examples.

I am not saying this is the best practice way of doing this but it worked for me. Wiser individuals might see otherwise.

Credits to My Digital Life where I gleaned most of this information
http://www.mydigitallife.info/2007/1...n-or-location/
TWD is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-06-2010, 05:37 AM Re: How to relocate your WordPress site
Novice Talker

Posts: 13
Trades: 0
I just did it today with my own wordpress

Goto your wordpress dashboard > settings
now change the "WordPress address (URL)" & "Blog address (URL)" with your new URL
Save Changes

Now don't try to open your website

goto control panel provided by your host provider

goto file manager with your old-domain.com

select all files and copy to new-domain.com

when files are copied then your new-domain.com will be ready and dublicate as your old ones
__________________

Please login or register to view this content. Registration is FREE
||
Please login or register to view this content. Registration is FREE
||
Please login or register to view this content. Registration is FREE
seekndestroy88 is offline
Reply With Quote
View Public Profile
 
Old 03-06-2010, 11:52 AM Re: How to relocate your WordPress site
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
@seekndestry88
Not necessarily, if you had internal links within posts that used full file paths from the root or custom fields that contained the old url's, those wouldn't be updated. Using TWD's method replaces all that.

Though, I must confess, I typically just use the xml export/import method and go back and manually change any links that were "http://localhost" to the new url.
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Old 04-02-2010, 02:01 AM Re: How to relocate your WordPress site
TWD
TWD's Avatar
King Spam Talker

Posts: 1,182
Trades: 0
Some notes to self:

1) When moving to or from a subdirectory as mentioned in the footnote above, be sure to include the trailing "/". Omitting that will cause the new installation to fail.

2) Don't forget to go through your plugins and look for configuration options that require hardcoding email addresses or web links. In particular the WP Ecom plugin has some links in the Settings/Admin page which, if you forget to update, will cause the checkout process to fail.

3) If some plugins don't work properly in the new install, make sure they were backed up in the first place! This can easily happen if extra plugins are added at some point but the WP DB configuration is not updated to include the extra tables. Just goes to show the importance of putting your backup recovery procedures to the acid test once in while to make sure everything is covered.
TWD is online now
Reply With Quote
View Public Profile
 
Old 05-27-2010, 11:14 PM Re: How to relocate your WordPress site
TWD
TWD's Avatar
King Spam Talker

Posts: 1,182
Trades: 0
More notes to self:

In the first of the SQL updates above, DO NOT include the trailing "/" in the case of moving from a subdirectory.

If this is correctly run you should see a success message
"2 Records Updated".
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE
TWD is online now
Reply With Quote
View Public Profile
 
Old 06-08-2010, 07:24 AM Re: How to relocate your WordPress site
Banned

Posts: 2
Name: Selina Jordan
Trades: 0
It all depends on theme and your way of promotion. I have a blog and a site [removed], I got 4th page position in two month with PR1 and getting good traffic.
Selina is offline
Reply With Quote
View Public Profile
 
Old 10-12-2010, 02:52 AM Re: How to relocate your WordPress site
TWD
TWD's Avatar
King Spam Talker

Posts: 1,182
Trades: 0
Not sure why (cookies maybe?) but straight after installing this you need to click on the product category links, which should work fine.
After that you can check the page links.
If you just type the page links directly into the URL it comes up 404 page not found.
Weird.

When moving from a domain to a url the correct form for the SQL queries is:

'http://www.olddomain.com'

to

'http://www.newdomain.com/subdirectory/'
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE
TWD is online now
Reply With Quote
View Public Profile
 
Old 10-20-2010, 03:05 AM Re: How to relocate your WordPress site
roshan@di91.com's Avatar
Experienced Talker

Posts: 30
Name: Roshan Chaudhary
Location: Haryana
Trades: 0
Here is step-by-step tutorial on how to move your WordPress site with zero downtime.

Backup the database from the old site and import it to the new site. Pay attention to database names.
Change your wp-config.php in the old site to point to the database on the new site. Your old site will now run using database based on the new site and once you change the names ervers new site will have the up to date database. (You may want to check with your new hosting if they allow outside database access first. If not, you can skip this step and transfer the database at the end, when the nameserver change propagated)
Backup your entire WordPress installation from the old site (this will include all your uploads, themes, plugins)
Unpack your WordPress installation to the new site
Change wp-config.php on the new site with new database details
Change the nameservers to point to the new site
That's all now you only need to wait
Since nameserver propagation can take up to one day, step 2 allows you to have up to date database at the moment it happens. Downside to this is slower site response in the meantime because site still runs from the old server and the database is on the new. But if you do this over the night or periods of low traffic it won't be that noticeable and you will not lose any comments or other activity on your site.
roshan@di91.com is offline
Reply With Quote
View Public Profile Visit roshan@di91.com's homepage!
 
Old 10-20-2010, 09:42 AM Re: How to relocate your WordPress site
TWD
TWD's Avatar
King Spam Talker

Posts: 1,182
Trades: 0
Quote:
Originally Posted by roshan@di91.com View Post
Here is step-by-step tutorial on how to move your WordPress site with zero downtime.

Backup the database from the old site and import it to the new site. Pay attention to database names.
Change your wp-config.php in the old site to point to the database on the new site. Your old site will now run using database based on the new site and once you change the names ervers new site will have the up to date database. (You may want to check with your new hosting if they allow outside database access first. If not, you can skip this step and transfer the database at the end, when the nameserver change propagated)
Backup your entire WordPress installation from the old site (this will include all your uploads, themes, plugins)
Unpack your WordPress installation to the new site
Change wp-config.php on the new site with new database details
Change the nameservers to point to the new site
That's all now you only need to wait
Since nameserver propagation can take up to one day, step 2 allows you to have up to date database at the moment it happens. Downside to this is slower site response in the meantime because site still runs from the old server and the database is on the new. But if you do this over the night or periods of low traffic it won't be that noticeable and you will not lose any comments or other activity on your site.
I appreciate the effort but I think you have missed the point.
Suggest you read the OP again.
The objective is to move a site from one domain to another domain so there is absolutely no need to be editing nameservers.
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals"
Please login or register to view this content. Registration is FREE
TWD is online now
Reply With Quote
View Public Profile
 
Old 10-21-2010, 01:35 AM Re: How to relocate your WordPress site
Skilled Talker

Posts: 59
Name: elenabush
Trades: 0
By making login on that you will get full authorization on that. then you put your features on the blog and create attractive blog spread over a facebook and make the other person as friends who has blog in wordpress find out him via blog code or User Id.
__________________

Please login or register to view this content. Registration is FREE
#
Please login or register to view this content. Registration is FREE
#
Please login or register to view this content. Registration is FREE
elena1234 is offline
Reply With Quote
View Public Profile Visit elena1234's homepage!
 
Old 10-21-2010, 02:02 AM Re: How to relocate your WordPress site
mikejoel's Avatar
Ultra Talker

Posts: 494
Name: mike joel ambler
Trades: 0
will try it in my own wordpress blog.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
mikejoel is offline
Reply With Quote
View Public Profile
 
Old 10-21-2010, 07:36 AM Re: How to relocate your WordPress site
Super Talker

Posts: 102
Name: Asad
Trades: 0
Good but after replace, you will have to make backlinks from start.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
newbie2010 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to How to relocate your WordPress site
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.57836 seconds with 12 queries