WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] recreating an existing blog under different TLD: error accessing DB! (3 posts)

  1. terrainnova
    Member
    Posted 1 year ago #

    Hello,

    I have a single installation of WP under mydomain.tld1 accessing db mydomaintld1 with user mydomain_tld1 in host mysql.mydomain.tld1 and I want to replicate the installation under a different top level domain tld2, with everything else staying the same. Here's what I did:

    1. I copied all files from one domain directory to the other
    2. I searched for and replaced all occurrences of mydomain.tld1 with mydomain.tld2 in the file structure
    3. I created a new db/user (mydomaintld2/mydomain_tld2), a new host at mysql.mydomain.tld2 and made sure it connects.
    4. I mysqldumped the tld1 db into a text file and went over it replace all mydomain.tld1 with mydomain.tld2
    5. I uploaded the modified mysql dump into the new tld2 db.
    6. Waited a bit for the DNS related dust to settle (don't know if it's relevant)

    I now get an "Error establishing a database connection" when trying to access mydomain.tld2 in my browser. I obviously have missed something in the transition but I can't think of anything.

    I obviously have looked into http://codex.wordpress.org/Moving_WordPress before posting this but couldn't find any help. Also, note that domain length remains the same - so serialisation according to the previous link shouldn't be problem in my process.

    Any ideas? Thanks

  2. phpsundar
    Member
    Posted 1 year ago #

    As you get this "Error establishing a database connection" , this means that the wordpress installed cannot find or connect to your database server or database.
    Check the wp-config file as well as the db file .
    Go to mysql command line on the server & try connecting to database using command line with the db name , user name & password , if it connects to the database , then check your wp config & db files for dbname , user name & password.

    Based on what you have mentioned above , the wordpress might have been installed correctly , but its unable to connect to database.

  3. terrainnova
    Member
    Posted 1 year ago #

    Right thanks doing the checks you suggested made me realise a typo. Thanks for that. I'll get back to you if I encounter further problems but it seems to be working now.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.