• Resolved claudiamorgan

    (@claudiamorgan)


    For reasons unknown at this point, WordPress just lost my database and when I went to my site it asked me to install WP. Thinking that it would install WP and grab my old database — and not knowing what else to do — I went ahead and now am at the “Hello World” point. I poked around and found the correct database that has all my posts and pages, but how do I go about pointing WordPress to the correct SQL file?

    I know just enough about myPHPadmin and SQL to look at things and to know I shouldn’t make any changes.

    Thanks for your help

    Claudia
    https://www.claudia-morgan.com

Viewing 6 replies - 1 through 6 (of 6 total)
  • You probably need to edit/change your wp-config.php file. Some directions are here: Codex: Installing WordPress#Step 3: Set up wp-config.php

    Thread Starter claudiamorgan

    (@claudiamorgan)

    I gave that a try but when I put in the correct database and save, then refresh the blog I get this error “Error establishing a database connection”. So I put the original db in and I am back to square one, with all my posts, etc., gone.

    Grrrrrr

    Make sure the new database has the user and password, with all the necessary privileges, that you put in the config.

    Here are a couple of video tutorials:

    Error Establishing Database Connection – 1 of 2

    Error Establishing Database Connection – 2 of 2

    Thread Starter claudiamorgan

    (@claudiamorgan)

    Hmmmm

    Well I learned a lot and I changed the problem (so maybe that is good). I created a new user and password and added it to the correct SQL database, deleted the other user, then updated the wp_config file :

    define(‘DB_NAME’, ‘******_wrdp4’); // The name of the database
    define(‘DB_USER’, ‘******_wpadmin’); // Your MySQL username
    define(‘DB_PASSWORD’, ‘******’); // …and password
    define(‘DB_HOST’, ‘localhost’); // Originally ‘localhost’

    Now when I refresh the page I get a blank screen and no errors. This is a bluehost hosted site and all my other blog sites have not problems so I don’t think it is the localhost issue.

    curiouser and curiouser

    Claudia https://claudia-morgan.com/

    There are lots of posts regarding blank screens. Maybe you can find your cause in one of them.

    Thread Starter claudiamorgan

    (@claudiamorgan)

    I am looking — tried the .htaccess thingy (no change). Also put up a fresh copy of the latest and greatest. No change.

    Thanks for all your help — I did a lot of searching in the forum but your YouTube videos were invaluable (especially since I also have bluehost).

    Claudia

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to re-attach SQL database’ is closed to new replies.