Forums » Fixing WordPress » How to move data from one database to another

  • hotinthenews

    (@hotinthenews)


    Hi;

    Got a prob. My site crashed. Got a backup but can’t import it. Sql in Cpanel says ‘time out file too big’.

    Does anyone know how I can copy data from WP data to another user SQL commands?

    example: I want to import all posts under category ‘world’ from table ‘Posts’ of database ‘A’ into table ‘Posts’ from database ‘B’.

    What would be the sql command to do that?

    thanks

    Lode

Viewing 1 replies (of 1 total)
  • catacaustic

    (@catacaustic)

    If you’re working with an SQL file (file.sql) then there’s a couple of ways to do it.

    One way that’s easy, but can be very time-consuming… You can open the SQL file in a text editor (NOT Word). From there you can pretty much copy-and-paste sections from that into the SQL window in phpMyAdmin. It will take a long time because there’s going to be a lot of data there, but it’s one way to get it done when you can’t break up the file.

    Another way is to again open the file in a text editor (and again NOT Word) and save parts of it out into separate files, then import each one in turn.

    The last idea would be to FTP the SQL file to your web server somewhere and ask your hosting company if they can import it. They will have command-line access on the server so file size shouldn’t matter to them. This will depend completely on the level of support that your host offers though.

Viewing 1 replies (of 1 total)
  • The topic ‘How to move data from one database to another’ is closed to new replies.