How to Layer 7 Load Balance WordPress Backend and Frontend?

The problem #1 & #2: Don’t know why you need to add and validate extra cookies, but for me, it’s simple and quite straight forward: This is what I have tried on vagrant boxes and with default WordPress structure: 1. Prepare 6 separate servers 111.111.1.10 – MySQL server 111.111.1.11 – HAProxy server 111.111.1.12 & 111.111.1.13 … Read more

Many POST requests to /xmlrpc.php from GoogleBot taking down server?

I would block the IP with iptables if it were me, and if you have that kind of server level access. You could also disable xmlrpc. Unfortunately, since 3.5 the admin screen option to disable that feature has been removed. A single line of code should disable it though: add_filter( ‘xmlrpc_enabled’, ‘__return_false’ ); That might … Read more

Restricting a Plugin to Only Load its CSS and JS on Selected Pages?

Styles and scripts are always set up by the functions wp_enqueue_script() and wp_enqueue_style(), which have to be tied to a particular action hook in order to function. I took a peek inside Contact Form 7, and it looks like it’s using action tags of wpcf7_enqueue_scripts and wpcf7_enqueue_styles to add them to the wp_print_scripts and wp_print_styles … Read more

Are WordPress Heartbeat API ‘beats’ staggered or do they occur simultaneously for all users?

I would think the beats are Staggered by nature, becasue the next tick is determined by the browser time time() within the scheduleNextTick() method in the /wp-includes/js/heartbeat.jsfile: var delta = time() – settings.lastTick, interval = settings.mainInterval; where it’s used to schedule the next tick with the setTimeout function: if ( delta < interval ) { … Read more

Profiling a WordPress Website for Deployment on Shared Hosting?

Profiling with Profiler-Plugins Not sure exactly what you need to accomplish with your profiling, but WP Tuner (WordPress Plugin) goes a long way to finding what is slowing down your WP install. It looks at each plugin and give your the memory, CPU time and SQL queries involved. The SQL Monitor (WordPress Plugin) analyzes SQL … Read more