WordPress.org

Ready to get started?Download WordPress

Forums

wp-config error? (8 posts)

  1. sportbiker
    Member
    Posted 9 years ago #

    All was well with my blog. I implemented the hivelogic trick in index.php to mask my email in the menu and all was looking up. Then I did a copy/paste of a different email mask into index.php, replacing the existing mask code, and now get "Error establishing a database connection! This probably means that the connection information in youn wp-config.php file is incorrect. Double check it and try again." ...but I didn't do ANYTHING to the config file! (I didn't even know I had one). I even tried simply cutting out the hivelogic code but it's still generating the error. Help!!!

  2. prara
    Member
    Posted 9 years ago #

    You should configure your MYSQL settings: username, password, database

  3. sportbiker
    Member
    Posted 9 years ago #

    I didn't set them up, the server admin did and they've been working fine. Why did they choose to break now? I wouldn't know how to change them even if I wanted to, so can you be more specific with directions?

  4. prara
    Member
    Posted 9 years ago #

    In your downloaded WP you can see these lines in wp-config-sample:
    modify these values (or ask your admin to modify for you)
    define('DB_NAME', 'wordpress'); // The name of the database
    define('DB_USER', 'username'); // Your MySQL username
    define('DB_PASSWORD', 'password'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

  5. prara
    Member
    Posted 9 years ago #

    And btw be sure to copy that to your wp-config.php

  6. sportbiker
    Member
    Posted 9 years ago #

    When I looked at those in wp-config.php they were already customized to my blog's name. As I mentioned, the sys admin set it up and it's been working for weeks. Would the info spontaneously combust?

  7. prara
    Member
    Posted 9 years ago #

    You have to recheck that with your admin.

  8. carthik
    Member
    Posted 9 years ago #

    sportbiker, if you used Cpanel or some other such online admin tool, and used it's editor to edit the files, that might be the reason.
    If you have not modified the index page too much, get a fresh one.
    Use wordpad to edit files, if you have to edit them.
    Just opening once and closing a file, using the Cpanel Edit interface has screwed things up for me, so there. :)
    Worst case - do a database backup using phpmyadmin. Grab a fresh WP copy, edit wp-config-sample.php and save as wp-config.php and upload it, and then run upgrade.
    The backup is just so that you don't lose anything if at all anything breaks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.