WordPress.org

Ready to get started?Download WordPress

Forums

Editing wp-config not working (16 posts)

  1. zukester
    Member
    Posted 4 years ago #

    Hi:

    I have been at this for months now, off and on. I lost the blog due to a bad theme, but using wp-config exactly per the instructions found here to reconnect do not do it. I have several DBs I could reconnect to, but the changes do not get me there.

  2. zukester
    Member
    Posted 4 years ago #

    Forgot to finish before sending.

    Also, forgot to say, was not able to export/import either. It is always the "wrong format" no matter which one I pick.

    Thanks, Zukester

  3. jimisaacs
    Member
    Posted 4 years ago #

    @zukester

    Need some more information before helping. What version was your blog when you lost it? What version are you trying to update to? Was it working fine before, and you are saying a theme broke your database connection, what theme is this in question?

    All you need in your wp-config are certain constants you can see from the wp-config-sample.php provided with any download. Compare your wp-config with this file, if there are no discrepancies, there is something else going on here that has nothing to do with this file.

  4. zukester
    Member
    Posted 4 years ago #

    Version is 2.9.2.

    Not sure which theme it was now, since i cannot get back into it to check.
    I can get WordPress to work, but only with a new DB and not with any existing ones that have posts in them.

    I checked both files, and they are identical in format, just the words "username, password" etc. have been replaced by the real ones.

    Thanks, Zukester

  5. jimisaacs
    Member
    Posted 4 years ago #

    Have you double checked the table prefix you are trying to use in the wp-config compared with the prefix that created the old databases?

  6. zukester
    Member
    Posted 4 years ago #

    Uh....ok.........table prefix?

    Let me try and see what you mean.

  7. jimisaacs
    Member
    Posted 4 years ago #

    Hopefully this will explain if you are in question:

    http://codex.wordpress.org/Editing_wp-config.php#table_prefix

  8. zukester
    Member
    Posted 4 years ago #

    Not sure how to put in a prefix. Currently it says,

    "$table_prefix = 'wp_';

    When I am in the PHP Admin, I only get options to Alter, Create, etc. databases and not sure which table should be referenced in

    $table_prefix = 'wp_';

  9. zukester
    Member
    Posted 4 years ago #

    OK. All of the tables have wp_ in the font, and that matches the wp-config.php entry

  10. jimisaacs
    Member
    Posted 4 years ago #

    When you are within PHP Admin, look that the tables within the databases that are in question. The tables may look something like this "wp_users", "wp_posts", "wp_postmeta", etc... The "wp_" is was the prefix set in the installation of these tables.

    So simply look at your tables, and then look at the value set for $table_prefix in your wp-config, and make sure they match up.

    [EDIT] Took too long the post this ;)

  11. jimisaacs
    Member
    Posted 4 years ago #

    Ok, well I am sorry to say that I cannot be of any more help without sitting there with you.

    I'm going to take a moment to let any other people jump in to see if they have any ideas I might be missing.

    If there is nothing added to this thread and if you don't find a solution within say, a day or 2, I will tell you that it may just be worth doing a dump and import straight from PHP Admin from one database to the other.

  12. zukester
    Member
    Posted 4 years ago #

    OK. read that page and took the wp-config-sample file, edited it to match the username, password, db name and uploaded as wp-config.php and immediately lost the connection.

    Like I said, for me to edit the sp-config either does nothing or disallows reconnection.

    "Error establishing a database connection."

  13. zukester
    Member
    Posted 4 years ago #

    >>If there is nothing added to this thread and if you don't find a solution within say, a day or 2, I will tell you that it may just be worth doing a dump and import straight from PHP Admin from one database to the other. <<

    I am game. How do I do that? Can I do that with all of them to get them all into one?

  14. zukester
    Member
    Posted 4 years ago #

    Blogaholic! That was it! The offending theme!

    I exported the username file for the DB and it was in there. If I change it back to the default theme, will it work (assuming that that was the issue)?

  15. jimisaacs
    Member
    Posted 4 years ago #

    @zukester Have some patience if you can spare some ;)
    I just want to see if anyone else has any ideas.

    I really don't like telling someone to go straight to the database if there may be another solution even if I can't think of one. If you are talking about actually combining the posts of multiple databases into another database, than this can become quite arduous and time consuming, and something I don't recommend without significant SQL query experience.

  16. zukester
    Member
    Posted 4 years ago #

    OK. I will wait.

    Thanks for trying.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.