WordPress.org

Ready to get started?Download WordPress

Forums

wp-config differences in 2.2 -- should I add DB_COLLATE or avoid it? (11 posts)

  1. Dgold
    Member
    Posted 7 years ago #

    My wp-config looks like this

    define('DB_NAME', 'my_name');     // The name of the database (DG also have 'my_name')
    define('DB_USER', 'my_name');     // Your MySQL username
    define('DB_PASSWORD', 'my_password'); // ...and password
    define('DB_HOST', 'localhost');     // 99% chance you won't need to change this value

    wp-config-sample from WP 2.2 looks similar but it adds this:

    define('DB_CHARSET', 'utf8');
    define('DB_COLLATE', '');

    When I upgraded from 2.0.x to 2.2, I followed the Upgrade Instructions in the Codex, which tells me to copy my old wp-config. Therefore the DB_CHARSET and DB_COLLATE are not in my wp-config.

    Should I add those 2 lines? Where does it tell me to do this, in the documentation or Codex? Is it safe to just add those 2 lines, and save the file?

    Yes, I have read the following pages in the Codex, and they are either Rough Drafts, or tell me NOT to add the above lines:
    http://codex.wordpress.org/Converting_Database_Character_Sets
    http://codex.wordpress.org/Editing_wp-config.php

    But I'm still wondering if I need those lines, because I am having a lot of character encoding issues, and also my feed doesn't work and the validation error mentions the utf8.

  2. MichaelH
    Member
    Posted 7 years ago #

    If you are using an upgraded database do NOT put those two lines in your wp-config.php. If you have a new install of 2.2, then it is okay to have those lines in that file.

    I do have to quote this from the http://codex.wordpress.org/Editing_wp-config.php

    * Warning for those performing upgrades: If DB_CHARSET and DB_COLLATE do not exist in your wp-config.php file, DO NOT add either definition to your wp-config.php file unless you read and understand Converting Database Character Sets. Adding DB_CHARSET and DB_COLLATE to the wp-config.php file, for an existing blog, can cause problems — as Ryan Boren says, "your queries will go boom!"

  3. Dgold
    Member
    Posted 7 years ago #

    Thanks for the answer.

    I did read that paragraph in the Codex. But since I was still having problems I wanted to double-check it was accurate and applied to me.

  4. moshu
    Member
    Posted 7 years ago #

    Maybe we should add somewhere in the upgrade instructions that, seemingly, automatic Fantastico upgrade overrides the old config file (adding the charset and collate lines) which makes the non-English blogs to "go boom"...

    There might be other issues, too, but this one stood out in several topics about upgrade to 2.2.

  5. MichaelH
    Member
    Posted 7 years ago #

    Special note for Fantastico Upgrades has been added to Upgrading WordPress. If there is a suggestion for better placement of this information, please say so.

  6. moshu
    Member
    Posted 7 years ago #

    Thanks Michael. I have no idea where else it should be - I'll take a look at the upgrade section, although I am afraid those who go with Fantastico will not read the Upgrade instructions anyway... only after their blog "goes boom" :)

  7. MichaelH
    Member
    Posted 7 years ago #

    I agree with you there...I've also noticed a number of cases where people are using the new wp-config-sample.php (non-Fantastico upgrades) and I'm not sure where (or if) to put a warning for that!

  8. Dgold
    Member
    Posted 7 years ago #

    How about putting the warning as Commented-Out text INSIDE the wp-config-sample.php file?

    At least for WP 2.2.1, that could help some people (non-Fantastico).

    There's already other commented-out comments in there, such as "99% chance you won't need to change this value" next to 'localhost'. So there is a precedent for writing helpful 1-liners in the actual file.

    Also: on the Fantastico front, how about contacting Fantastico and see if they can stop serving their upgrade in that manner? Or if they can warn their users? I realize Fantastico is not WP's responsibility, but that might be one of the quickest ways to resolve the amount of incoming problems.

  9. moshu
    Member
    Posted 7 years ago #

    Yes, but that's done by the developers - not by the non-developer helpers in the forum :(

  10. MichaelH
    Member
    Posted 7 years ago #

    Message placed on Fantastico forums:
    http://netenberg.com/forum/viewtopic.php?t=5841

  11. Dgold
    Member
    Posted 7 years ago #

    That's some support magic right there ^^

    Hopefully Fantastico themselves will heed the advice, as well as any users who have the problem finding your thread.

Topic Closed

This topic has been closed to new replies.

About this Topic