Persistent Mysql Connections WordPress

To enable and use persistent connections with WordPress, simply login to your web host with SSH (or insecure Telnet), and change to the webroot home directory where WordPress blog is installed.
Then change directory into wp-includes directory.

Inside the wp-includes directory, there is wp-db.php file. Use any text editor such as vi to edit wp-db.php. Search or locate the function of mysql_connect (or @mysql_connect).
There is only one instance of mysql_connect. Just change the mysql_connect to mysql_pconnect, then save and exit the wp-db.php.
WordPress and PHP (as long as you don’t turn off the mysql.allow_persistent in PHP.INI) will immediately use persistent connections to connect to MySQL database. It’s worth to try out which setting is best for your environment.

2 Responses to “Persistent Mysql Connections WordPress”

  1. Zoomreriomy

    Hey there everyone i was just introduceing myself here im a first time visitor who hopes to become a daily reader!

  2. SetTeebraHelt

    Hey everyone just wanna say hello and introduce myself!

Leave a Reply

}) _0- O-) ;) ;( :{ :o :Y :X :P :N :D :@ :? :9~ :) :(