Forums

[resolved] wp-config.php and secret key in upgrade from 2.2 (11 posts)

  1. pcmt
    Member
    Posted 3 years ago #

    The upgrade instructions say not to delete wp-config.php when upgrading (to 2.5.1). The version being upgraded (2.2.3) doesn't have a SECRET_KEY, so should line 13 (defining the secret key) be added to the existing wp-config.php file and uploaded as part of the upgrade?

  2. Otto
    Tech Ninja
    Posted 3 years ago #

  3. pcmt
    Member
    Posted 3 years ago #

    I read it before I posted my question. I also read this in the Codex:

    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!"

    I don't understand Converting Database Character Sets and I don't want my queries to go boom. I'm running 2.2.3 and want to upgrade to 2.5.1, and the upgrade instructions don't mention anything about the secret key. So do I leave my current wp-config.php alone?

  4. Otto
    Tech Ninja
    Posted 3 years ago #

    You can add the secret key to the file all you like.

    Charset and collate are special cases.

  5. pcmt
    Member
    Posted 3 years ago #

    Okay, I think I see. I'll take that as a yes: I can add the new line 13 to the wp-config.php file to define a secret key when I do the upgrade. And my queries won't go boom.

    Many thanks.

  6. pcmt
    Member
    Posted 3 years ago #

    The upgrade from 2.2.3 to 2.5.1 went very smoothly.

    Thank you to the WordPress development team and the forum moderators.

    Patrick

  7. kaeru
    Member
    Posted 3 years ago #

    Otto42, what happens when one inadvertently adds the lines

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

    to wp-config.php? (Like myself.)

    Does it influence what happens when you upgrade your database?

    I'm asking this because I have since had issues with several plugins, and text misbehaves if I leave the lines in the configuration file…

  8. Otto
    Tech Ninja
    Posted 3 years ago #

    Regarding CHARSET and COLLATE: If you didn't have them before an upgrade, don't add them. If you are installing a fresh install, leave them there.

    Simple as that.

    More detailed info here:
    http://codex.wordpress.org/Converting_Database_Character_Sets

  9. kaeru
    Member
    Posted 3 years ago #

    Which is totally clear Otto42, but what I was asking is:

    What happens if by accident, you put those two items in the wp-config.php of an 'old' WordPress blog and then upgrade the database? Does it affect the database?

  10. Otto
    Tech Ninja
    Posted 3 years ago #

    Nothing special happens. Those don't change anything with regards to the upgrade process.

  11. kaeru
    Member
    Posted 3 years ago #

    Thanks Otto42, that helps me in ruling out a cause for issues I have been having since my upgrade.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags