Database connection close

You don’t have to worry about closing connection to you DB because it will be automatically closed when a request will be processed by your server.

But if you have to close it, then you can do something like this:

@mysql_close( $wpdb->dbh );

Pay attention that it could lead to unexpected results because other plugins could rely on this connection.

Leave a Comment