Forum Replies Created

Viewing 15 replies - 16 through 30 (of 43 total)
  • Same here!

    +1
    As would I!

    Thread Starter davegregg

    (@davegregg)

    So do I have an incomplete or redundant caching setup right now?
    I have…
    – WP Super Cache
    – Memcached + Memcached PECL extension for PHP + Ryan’s Memcached backend plugin for WordPress
    – APC
    – CloudFlare free

    Also, is the APC Object Cache backend plugin compatible with the Memcached one? And if you have APC installed (extending your PHP) for use with WP Super Cache, is there really any need to install Memcached, it’s PHP extension, and it’s WP backend plugin at all?

    davegregg

    (@davegregg)

    Ditto. How has this not been answered?

    Thread Starter davegregg

    (@davegregg)

    Ahhhhh! So, so helpful Mark. Thanks for the clarification. Understanding that has been a long time coming. ??

    Thread Starter davegregg

    (@davegregg)

    Hubert, my understanding is that WP caching plugins, like Batcache, may be used to supplement some server-installed caching engine (like APC). On its own, a server app like APC would do caching, but would only know to refresh the cache on a schedule, which is why an associated plugin in WordPress is useful: the plugin tells the server caching app to refresh on content updates, like new posts. Some WordPress caching plugins are able to communicate with server caching apps, some aren’t. Some WP caching plugins are capable of using alternative or additional methods of caching (or otherwise improving your site’s speed) in addition to their server-caching extensibility, and some aren’t capable of doing so.

    Someone correct me if my understanding is inaccurate.

    Thread Starter davegregg

    (@davegregg)

    SOLVED! The code above works perfectly. Coincidentally, NEVER accidentally type “$>” at the end of any PHP file instead of “?>”… ;D

    Thread Starter davegregg

    (@davegregg)

    I have revised the code to take into account the various passed variables. This does not solve the problem with it breaking my WP Network, however.

    function dmg_do_nothing($dummy_a = '',$dummy_b = '',$dummy_c = '',$dummy_d = '',$dummy_e = '',$dummy_f = '',$dummy_g = '') {
    	return;
    }
    
    //replaced pluggable function
    if ( !function_exists('wp_new_user_notification') ) :
    	function wp_new_user_notification($user_id, $plaintext_pass = '') {
    		return;
    	}
    endif;
    
    //filters for overriding other functions
    add_filter('wpmu_signup_blog_notification', 'dmg_do_nothing', 1, 7);
    add_filter('wpmu_signup_user_notification', 'dmg_do_nothing', 1, 4);
    add_filter('wpmu_welcome_notification', 'dmg_do_nothing', 1, 5);
    add_filter('wpmu_welcome_user_notification', 'dmg_do_nothing', 1, 3);

    Thread Starter davegregg

    (@davegregg)

    “wp_new_user_notification” is the only pluggable function among them. The other four do accept filters, however. They reside in ms-functions.php and each have this kind of description and filter-check code:

    /*
     * Filter 'wpmu_signup_blog_notification' to bypass this function or
     * replace it with your own notification behavior.
     */

    if ( !apply_filters('wpmu_signup_blog_notification', $domain, $path, $title, $user, $user_email, $key, $meta) )
    		return false;

    So, it’s clear that it is possible to override these four functions using a filter, but I don’t know how to do that. Again, the four non-pluggable functions I need to override are:

    wpmu_signup_blog_notification
    wpmu_signup_user_notification
    wpmu_welcome_notification
    wpmu_welcome_user_notification

    Thread Starter davegregg

    (@davegregg)

    I didn’t wrap it in a function. I did essentially the same thing you did with that function. But then there are also other WP functions that perform similar tasks, see the list of functions I attempted to filter below the pluggable function in the code in my first post.

    I’ve tested merely overriding the wp_new_user_notification function and the new site admin still gets an email. Let me explain what’s happening:

    In an untouched WP Network, when a new site is created from the Network Admin dashboard, a new site admin user is created automatically as well. So because WordPress by default sends a welcome email to a new user AND a new site notification email to the site admin, the brand new site admin user receives *two* emails.

    The wp_new_user_notification pluggable function only controls *one* of those two emails. I’m trying to prevent a welcome or notification email from *ever* being sent to site admins. We communicate that information to our clients manually and neither want nor need WordPress to do this for us.

    Thread Starter davegregg

    (@davegregg)

    ^ What she said. ??

    Thread Starter davegregg

    (@davegregg)

    RESOLVED. It turned out to be a nameserver issue. The cPanel wildcard subdomain trick only works when the domain’s nameservers are set to Bluehost’s ns1 & ns2. Other nameservers may get you to the homepage, but subdomains, or at least wildcard subdomains, won’t resolve to a location on your server.

    I should have known this! ??

    Thread Starter davegregg

    (@davegregg)

    Yeah that’s what I ended up doing to test it, basically. I just dropped a different comment in each footer.php and viewed the source of the front page. That was zany. Well thank you guys for the help! Now to test some plugins and we’ll be back to business! THANKS!

    Thread Starter davegregg

    (@davegregg)

    Alright, I worked it out. The problem was that sometime over the course of the night the domain name switched from the Mediatemple nameservers BACK to the Bluehost nameservers, and so what I was seeing when I was logging into the WordPress installation wasn’t the new multi-db VPS installation, but the single-db installation still sitting on the Bluehost server — thus the reason it appeared that something set my WP installation back a day. I got it fixed and now everything appears to be working perfectly, SharDB and all.

    Thanks guys! I’m glad it was something simple. ?? Thanks for the great plugin and the instruction manual!

    Thread Starter davegregg

    (@davegregg)

    db.php isn’t exactly disappearing. It’s in the proper folder in the filesystem and I’ve double checked its contents. Something is preventing it from appearing on the Drop-ins menu. I think I’m going to delete all the databases and files and start from scratch from my backups.

Viewing 15 replies - 16 through 30 (of 43 total)