WordPress.org

Ready to get started?Download WordPress

Forums

Need to configure wp-config to allow multiple database users (12 posts)

  1. ctingom
    Member
    Posted 8 years ago #

    Hi, I need to modify wp-config.php and need help with the php.

    Basically this wordpress blog is on ipowerweb and I need to work around the problem where you can only have 50,000 database connections an hour. Something to do with max_resource.


    I want to change this:
    define('DB_NAME', 'mydbname'); // The name of the database
    define('DB_USER', 'mydbuser'); // Your MySQL username
    define('DB_PASSWORD', 'mypass'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

    So that it calls more than one database user.

    I'm using WP 2.0.

    Anyone know how that might be accomplished?

  2. moshu
    Member
    Posted 8 years ago #

    I'd get another host.

  3. VaamYob
    Member
    Posted 8 years ago #

    If you're exceeding 50k db connections an hour, I'd get a dedicated server.

  4. ctingom
    Member
    Posted 8 years ago #

    Yeah, in this case it's out of my control about what host to use. I've already recommended getting another host to this customer.

  5. VaamYob
    Member
    Posted 8 years ago #

    lol, I'm actually an affiliate of theirs (iPowerWeb)!

  6. VaamYob
    Member
    Posted 8 years ago #

    You may want to try lightpress.com, it's supposed to be a slimmed down (fewer sql queries), less featured version of wordpress.

  7. ctingom
    Member
    Posted 8 years ago #

    Vaam - Thanks for the recommendation. I was hoping I might be able to just rotate the username wordpress uses to access the database. If there's a way to do that in the code it would be a 5 min fix as opposed to something that takes half a day.

    I have heard good things about Lightpress though.

  8. VaamYob
    Member
    Posted 8 years ago #

    Yeah, if it wasn't for the fact that the db user's name/password were constants, you could use some sort of round-robin technique.

  9. ctingom
    Member
    Posted 8 years ago #

    Oh well, it's no big deal. Just a situation where I think my client needs to get a better web host, not that we need to innovate.

  10. You are making use of your cache folder, yes?

    (Make sure /wp-content/cache/ has write access.)

  11. ctingom
    Member
    Posted 8 years ago #

    I am now!! This is awesome. Thanks!

  12. That should cut the queries in like 1/2.

Topic Closed

This topic has been closed to new replies.

About this Topic