Migrating WP site to another URL

We are planning to change the domain name of our website.We are not changing the host but creating a new domain and will close/redirect all traffic to new domain (there will be not update on the old domain).

Since most of the database still will be same as we need old post so i am wondering how best we can handle this situation.i have following points in my mind

Read More
  1. Install new WordPress.
  2. Copy all the static contents (images/videos etc) to new WP installation location.

i am confused about how to handle database stuff? should we create a new database and import the data from old database to new one and den set any links and HOME URLs using SQL script.

Please advise.Also what is the best way to import the database

Related posts

Leave a Reply

4 comments

  1. I’ve written a very simple script that is built to do exactly what you’re talking about. Here’s the basic process you’ll want to follow.

    1. On the old server, log-in to PHPmyAdmin and export the database.
    2. On the new server, log-in to PHPmyAdmin and create your database. You may need to create a new MySQL user as well, but your web host should be able to assist you. Make a note of the database name, the MySQL username and password as well as the database host (usually localhost).
    3. Using PHPmyAdmin on the new server, import your old database into the new database.
    4. Using FTP, copy all of the files from the old server onto your computer.
    5. Open the wp-config.php file and enter your new database name, username, password and database host.
    6. Go to http://philipdowner.com/2012/01/script-to-make-wordpress-site-migrations-easier/ and download the wp-migrate.php script. Place this in the root of your WordPress site.
    7. Upload the site and all of it’s files (included the wp-migrate.php) file to your new server.
    8. Point your web browser to http://yournewdomainname.com/wp-migrate.php and follow the directions in the script.
    9. The script will update all instances of the old URL in the database for you.

    If you need further help, there’s a couple of great threads here on this forum. Also see the Codex article on backing up your database.

  2. Basically, you’d need to do the following…

    1. Copy all the files to the new location.
    2. Create a new database.
    3. Import the data from the old database and export to the new database.
    4. Update the URLs via SQL.

    Check out Moving WordPress for more.

    1. Copy files to new location via FTP.
    2. Create new database.
    3. Export database from old location.
    4. Import database into new location.
    5. Update the URLs in phpMyAdmin
    6. Change the wp-config.php file to point to your new database.
  3. Is there any reason that simply exporting your content and then importing via the importer plugin wouldn’t work? I recently moved my blog in an almost identical manner to what you are describing (302 redirect, keeping all the content, etc) and it went smoothly enough.

    Other than that, WordPress has an excellent guide to moving your install across folders, servers or just changing URLs.