Forum Replies Created
Glad to see what I am saying confirmed with independent realworld proof.
Pleased to be of service.
BTW, just how big is your site that you require multiple db servers?
I don’t know of a single WordPress+bbPress install, other than Automattic’s that are using multiple db servers.
(unless of course you are running other apps that have heavy db use or maybe for backup replication)
It’s more for redundancy than anything else, although before we got opcode caching in and had optimised some plugins involved we were catching traffic surges when our client tweeted new posts that were making us very very glad we had that much capacity.In reply to: Akismet Whitelisting Domains
There’s also another possibly I have been considering – only send to akismet the first few dozen posts by any new member. After that many they’ve probably met with your approval and any other moderation should be done manually, not automatically.
This is a very tempting solution. We’re getting so many false positives I turned off Akismet over the weekend, but inevitably Spam flowed in through the unmanned defences. Talk about being caught between a rock and a hard place!
On a single computer system with a fast mysql server and fast disk cache, this typically is not a big problem. As a site has to scale this does become a problem because there is only one mysql source and everything has to be fetched from it.
Interestingly we’re running a WP install with two load balanced app servers and two DB servers… our host has the MySQL tuned up so well that we’re seeing absolutely no advantage when we installed memcached as an object cache. The lesson is: don’t assume, test. Check your queries AND page gen time, then install your proposed enhancements (APC, memcached, whatever) and check your queries and page gen time again… seeing an improvement? Keep the changes, otherwise drop them.In reply to: how to disable registration ?
Rather than editing or removing core files, I wrote this simple plugin:
Plugin Name: Disable Registrations
Description: This plugin disables access to registration.php and blocks any registrations.
Plugin URI: http://simonwheatley.co.uk/bbpress/disable-registrations
Author: Simon Wheatley
Author URI: http://simonwheatley.co.uk/
// Fires every time bbPress inits, a bit ick but it's super quick string ops
// (which is what PHP is good at).
// Shame there isn't a hook to grab before the new user is registered on register.php
// In the absence of that, we will check whether we're on register.php
if ( ! da_str_ends_with( strtolower( $_SERVER[ 'PHP_SELF' ] ), 'register.php' ) ) return;
// We are on register.php? Stop executing (with a message).
bb_die( "Registration is not allowed on this website. Please contact the site administrators." );
exit; // Never reached, unless bb_die fails for some freaky reason
// Checks whether string a ends with string b
function da_str_ends_with(& $str, $end)
return ( substr( $str, - strlen( $end ), strlen( $end ) ) == $end );
add_action( 'bb_init', 'da_disable_registrations' );