1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Moving a directory to a new domain...

Discussion in 'Site & Server Administration' started by ViciousSummer, May 3, 2006.

  1. #1
    I recently move my lingerie store to a new domain and everything works except for the lingerie directory. I get an error when I try to access the admin portion. Is it possible to move the directory database, etc. to the new domain? I'm a bit lost on where to start :confused:
     
    ViciousSummer, May 3, 2006 IP
  2. bentong

    bentong Banned

    Messages:
    3,543
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    0
    #2
    yes, are they hosted only on the same server? I think the internal server error is caused by the .htaccess file..

    if they are hosted differently, you only have to backup, restore and then changed the config file to reflect the new db name & password.
     
    bentong, May 3, 2006 IP
    ViciousSummer and westhaven like this.
  3. ViciousSummer

    ViciousSummer Ayn Rand for President! Staff

    Messages:
    3,210
    Likes Received:
    526
    Best Answers:
    0
    Trophy Points:
    308
    #3
    Yes, the new and old domains are on different servers. So I have to create a new db, since it's a new server, right?
     
    ViciousSummer, May 3, 2006 IP
  4. bentong

    bentong Banned

    Messages:
    3,543
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    0
    #4
    1. backup the database on phpmyadmin, the export tab
    2. on your new server, create a database and then restore on the sql tab
    3. change the config file to reflect the new db name, db user and password.
     
    bentong, May 3, 2006 IP
  5. ViciousSummer

    ViciousSummer Ayn Rand for President! Staff

    Messages:
    3,210
    Likes Received:
    526
    Best Answers:
    0
    Trophy Points:
    308
    #5
    Thanks SO much for the help, Bentong!

    I created the new db, changed the config file and everything is perfect...except that we can't find my old database :( . So here is a stupid question: Is there any way to restore the directory without the original DB?
     
    ViciousSummer, May 8, 2006 IP
  6. theblight

    theblight Peon

    Messages:
    246
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #6
    it should be found using your phpmyadmin on your old server, if not, you can use the sql provided by the application, and dont forget not to put down your old server for at least two days to ensure the propagation and lessen the loss and errors for some archived links that might point to your old server
     
    theblight, May 10, 2006 IP
    ViciousSummer likes this.
  7. ViciousSummer

    ViciousSummer Ayn Rand for President! Staff

    Messages:
    3,210
    Likes Received:
    526
    Best Answers:
    0
    Trophy Points:
    308
    #7
    I think were I messed up was that I was using the same db for two different things (a shopping cart and a directory). Is that even possible to do? When we exported the db it was obviously the shopping cart db. Maybe that's why my directory was half-broken to begin with?
     
    ViciousSummer, May 11, 2006 IP
  8. theblight

    theblight Peon

    Messages:
    246
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #8
    if you find your shopping cart application working and has no errors, it is really the shopping cart's. then do another export of the directory then.

    Hope it Helps
     
    theblight, May 12, 2006 IP
  9. ViciousSummer

    ViciousSummer Ayn Rand for President! Staff

    Messages:
    3,210
    Likes Received:
    526
    Best Answers:
    0
    Trophy Points:
    308
    #9
    So if we try to export the DB twice it should spit out both the shopping cart and the separate directory? Sorry to bug you again, I just don't want to bother Shawn if I don't have to ;).
     
    ViciousSummer, May 14, 2006 IP
  10. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #10
    Hi VS,

    My suggestion is for now backup everything, but exporting/importing Db's you may mess up your DB.

    How many DB's did you have on your old server? If you are not sure which Db belongs to which section then best to export them all.

    Bentong is right about the steps to follow, you need to Export your old db as an SQL file (make sure Check All is selected), tick the "Export as file" box, click Export and then it'll save as a .sql file.

    Then create a new DB with same username and password on the new server(with same name), click on SQL, then Browse File to find the .sql and then click Ok. It should copy all the old data into the new db.

    I'm sure there is still problems as your new server will be looking for the db on the old server (i.e. something like oldserver_dbname). You need to change all instances of the referals to the oldserver_dbname to newserver_dbname. You might have to do the same with the username also.

    Hope this makes sense.
     
    misohoni, May 15, 2006 IP
    ViciousSummer likes this.
  11. ViciousSummer

    ViciousSummer Ayn Rand for President! Staff

    Messages:
    3,210
    Likes Received:
    526
    Best Answers:
    0
    Trophy Points:
    308
    #11
    YAY! I got it to work (and I learned a bunch about databases in the process...). Basically since I was running both a shopping cart and the directory on the same database, when the database was exported they were both in the export (I just didn't see it at 1st glance since the shopping cart and directory are all mixed in together). I thought I would have to separate the two sets of info, but no, i just uploaded the export to my new server and it works like a charm. Woohoo!

    Now if I could just get my stupid lingerie blog to work...:(
     
    ViciousSummer, May 18, 2006 IP