How to copy a wordpress blog from one domain to another?

Discussion in 'WordPress' started by wuken, Jul 26, 2009.

  1. #1
    I have tried to copy files and SQL directly through cpanel, but I cannot login the wordpress admin section because it keeps redirecting to the old domain.

    How to get around the situation?

    Thank you very much.
     
    wuken, Jul 26, 2009 IP
  2. theivo

    theivo Well-Known Member

    Messages:
    238
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #2
    first thing is to update the new address info in your wp-admin panel - configuration. Then move your blog.
    If it's a too complicated
    Another idea is to make new install, copy the template and use the import / export function in your blog admin panel
     
    theivo, Jul 26, 2009 IP
  3. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #3
    Agreed.

    1. Save your theme and plugins, export your existing WP db via the WP control panel. Export it from cPanel/phpMyAdmin too if you can (just in case).

    2. Upload WP to your new server (with an empty db) - Use the same WP version as your old site unless you're REALLY confident that your theme and plugins can handle the upgrade to the latest WP version. You've now got a 'fresh' WP install. No posts, nothing.

    3. Upload your new theme and plugins.

    4. Import your old db.
     
    Kerosene, Jul 26, 2009 IP
  4. Houdy

    Houdy Peon

    Messages:
    267
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #4
    When you import the database it still has the old domains information in it. You will need to edit the database of the new domain.

    Basically you will need to change all instances of the old domain to the new one in the database. A Google for "edit wordpress database for new domain" will get you going.
     
    Houdy, Jul 26, 2009 IP
  5. wuken

    wuken Well-Known Member

    Messages:
    113
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #5
    Thanks for all the inputs. I overlooked the import/export function in wp admin... Help a ton.
     
    wuken, Jul 26, 2009 IP
  6. geekos

    geekos Well-Known Member

    Messages:
    3,365
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    140
    #6
    If you manually exporting the database to another db. Dont forget to edit the "wp-config.php" for the databse connection info.
     
    geekos, Jul 26, 2009 IP
  7. ~kev~

    ~kev~ Well-Known Member

    Messages:
    2,866
    Likes Received:
    194
    Best Answers:
    0
    Trophy Points:
    110
    #7
    Use the export feature on the old site and import it into the new site. You said your redirected from the old site to the new site? Maybe there is a 301 redirect in the htaaccess file? If so, remove the redirect for a little while.

    Export the post, then go to the new site and use the import feature. If you have any images on the old site, the import will move the images from the old site to the new site. So make sure you have the uploads folder chomoded to 666 or 777. Or else you will get an error when the images are moved - because the server will not be able to create the folders it needs.
     
    ~kev~, Jul 27, 2009 IP