Import somebody else's database?

10 replies
Just bought a ready-made PLR blog to install on my website, and the database is supplied in SQL format.

So I installed an importer plugin, but it expects to see a WXR file.

I've looked online, and the only instructions I've seen for importing SQLs talk about restoring a database file back into the same blog it was backed up from.

How do I import this file (containing the vendor's username, DB name, etc.) into my WordPress installation? Do I need to edit this original file to contain my own DB details?

Cheers from warm and smiling Thailand,
Charles
#blog #database #import #sql file #wxr file
  • Profile picture of the author Myles Sinclair
    Hi Charles,

    You will need to create a new database in your control panel. Also create a username for the database, and then add the username to the database.

    When you've done that you can go to php Myadmin in your control panel. Select the database that you've created and then you can import the MySQL file.

    You will also need to edit the config.php file to reflect the new database details. The database name, username, and password need changing. The host name is usually "localhost" but this is not always the case. Best to check with your web host if you are uncertain.

    Hope this helps,

    Myles
    {{ DiscussionBoard.errors[2833297].message }}
    • Profile picture of the author charlesburke
      Hi Miles and WD,

      Thanks for the quick replies.

      Originally Posted by Myles Sinclair View Post

      You will also need to edit the config.php file to reflect the new database details. The database name, username, and password need changing. The host name is usually "localhost" but this is not always the case. Best to check with your web host if you are uncertain.

      Myles
      Still not quite clear... does this mean I'll need to change the database name, username, and password in the config file to match those in the imported SQL file? Or does the import change things in the config file, and I'm just changing them back to match the database in my own WP setup

      EDIT:
      Oops - just saw your post Jose - thanks. I'll go do exactly what it says. And I'll assume I need to edit the SQL file and change the other person's username, DB name and password to my own. Naturally, I won't be working on the original file.
      Signature
      MisterEbook.com
      Special offer for all Warrior authors... MisterEbook.com/warriorsonly.html
      {{ DiscussionBoard.errors[2833389].message }}
      • Profile picture of the author Myles Sinclair
        Originally Posted by charlesburke View Post

        Hi Myles and WD,

        EDIT:
        Oops - just saw your post Jose - thanks. I'll go do exactly what it says. And I'll assume I need to edit the SQL file and change the other person's username, DB name and password to my own. Naturally, I won't be working on the original file.
        Hi Charles,

        You don't need to change the MySQL file in any way. It won't contain the old blogs username or passwords. The file that needs to be changed is config.php That needs to refect the new database details. Username, password, etc.,

        Myles
        {{ DiscussionBoard.errors[2833467].message }}
        • Profile picture of the author Istvan Horvath
          Originally Posted by Myles Sinclair View Post

          You don't need to change the MySQL file in any way. It won't contain the old blogs username or passwords.
          Unfortunately, that's not true...

          It is good to differentiate between passwords and passwords.

          When you have a site built with WP you need to remember the username and pw for:
          1. your cPanel (or whatever site management software your host has)
          2. the MySQL database username and password that you created
          3. the WordPress installation username (admin?) and password

          #3 is stored in the database!

          #1 was given to you by your host when you signed up;
          #2 is used in the wp-config.php file
          Signature

          {{ DiscussionBoard.errors[2833575].message }}
          • Profile picture of the author Myles Sinclair
            Originally Posted by Istvan Horvath View Post

            Unfortunately, that's not true...

            It is good to differentiate between passwords and passwords.

            When you have a site built with WP you need to remember the username and pw for:
            1. your cPanel (or whatever site management software your host has)
            2. the MySQL database username and password that you created
            3. the WordPress installation username (admin?) and password

            #3 is stored in the database!

            #1 was given to you by your host when you signed up;
            #2 is used in the wp-config.php file
            Oops, I'd forgotten about number 3!

            What I really meant was that Charles shouldn't have to edit anything in the MySQL file in order to make the transfer. The previous owner should give him the login details for the blog. But it is a good idea to change the login password for the Wordpress control panel once the transfer is successful.

            My apologies for any confusion.

            Myles
            {{ DiscussionBoard.errors[2833762].message }}
  • Profile picture of the author WD Mino
    Yup. Just what Myles said.
    -WD
    Signature

    "As a man thinks in his heart so is he-Proverbs 23:7"

    {{ DiscussionBoard.errors[2833300].message }}
  • Profile picture of the author Istvan Horvath
    If you buy the domain, too, then you don't have to edit anything.

    If you bought the blog's content and you are going to install it on another domain then you would have to edit either the .sql file or the 'home' and 'site_url' rows in the wp-options table. Many times it is easier to make the changes in phpMyadmin after importing the .sql file than to go through the huge file with a text editor...
    Signature

    {{ DiscussionBoard.errors[2833794].message }}
  • Profile picture of the author charlesburke
    Sorry guys, I'm no stranger to building HTML sites, and I've installed a bunch of WP blogs, both manually and with Fantastico. But I've tried every combination I can think of with this thing and every way I turn it, it's a no-go.

    * Upload the bought files, make an empty database and import the unedited SQL - no

    * Same with the edited SQL - no

    * Upload the bought files, run install, delete the DB tables, then import either of the SQLs - no & no

    * Run a Fantastico install, delete the DB tables, then import either of the SQLs - no & no

    * Etc.......

    Virtually no instructions came with this (just a copy of WP's install page for version 2.7).

    I'm beginning to wonder if the vendor deliberately set this up to be difficult. That way customers will come back and spend the $15 to get it installed.

    Cheers,
    Charles
    Signature
    MisterEbook.com
    Special offer for all Warrior authors... MisterEbook.com/warriorsonly.html
    {{ DiscussionBoard.errors[2835457].message }}
  • Profile picture of the author Istvan Horvath
    If you think I could help... PM me with the access info and I'd like to take a look at it (too much of a professional challenge for me not to try, LOL)
    Signature

    {{ DiscussionBoard.errors[2835469].message }}

Trending Topics