Crrently I am trying to moving my wordpress website to new paid hosting service godaddy. It is a wordpress managed hosting. I have gone throgh a lot on internet on moving wordpress from one host to other host. The suggested duplicator plugin was not working for me. Finally, I tried the follwing:-
Assume that my old website name is
www.old-site.org
My new (temperory) address is
www.new-site.org
I downloaded the entire website from www.old-site.org
Downloaded database backup from wordpress. Then edited the old wp-config.php replaced the database name, username and password with the new site’s database details. Finally used filezilla to move the old site files to www.new-site.org/new
location. After all done, typed www.new-site.org/new/wp-login.php
in firefox. A login window appeared and asked for the password. It looks like all done. However, after login the site addreas goes to www.old-site.org/wp-admin/
. What is the mistake I have done and how do I overcome this issue? Do I have to replace URL in any file?
Edit:-
Ok. I did the following now. Downloaded the old *.sql database. Used http://pixelentity.com/wordpress-search-replace-domain/ lik for changing old url with new one. Then I gone to godaddy phpAdmin –> import database and imported the modified Sql file. But the result is same. After login the site is going back to old url.
if followed correctly it should work.
Alternatively for database URL replacement you can use wp migrate db plugin that takes care of serialized arrays..
Also for complete automatic migration you can use all-in-one wp migration plugin which is also good
Please make sure in your ‘wp_options’ table the values for :
'siteurl' and 'home' should be => www.new-site.org
You must edit your wpconfig.php to contain the new “base url” and besides that, edit your database to have the right URL.
Otherwise it will always redirect you to your old site.
WPconfig:
Database:
Look for the table wp_options.
Find under option_name the “siteurl” and change the option_value to contain the new URL.
Might also want to look @ http://codex.wordpress.org/Changing_The_Site_URL
Please run these SQL queries in your database:
The database will contain references to the old url, to fix you can edit the .sql backup before reimporting it:
Delete the database on your new host.
Open the sql backup file from your old host in notepad or similar texteditor
Do a find and replace for
www.old-site.org
towww.new-site.org/new
, save, and import into new hosting.You need change all places where your old URL is recorded in database.
For that you can use this plugin: https://wordpress.org/plugins/search-and-replace/
Using this ‘Search and Replace’ look for ‘www.old-site.org’ and replace to ‘www.new-site.org/new’.
In your wp-config is important find all old URL and replace to the new too.
I hope it helps!
As pointed out by the previous answers, the unique thing you have to do is to change the references to old url with references to the new ones.
To do this, you ha ve to change the configuration settings in your wp-config.php file as pointed out by Chilion:
Once you have done this, you have to change references also for slugs.
The URL of slugs are more complex to change, as they cannot be simply edited: they are serialized, so you need a dedicated script.
Here there are all the information you need: http://codex.wordpress.org/Moving_WordPress
Duplicator is really a great plugin to automate the migration: what didn’t exactly work for you? Which is the problem?
For those of you missing the old tool by Pixelentity (that unfortunately has been shut down since) linked in the original post, I wanted to let you know there is an exact clone of that tool available at wordpress-search-replace.io ðº