Should I enable FastCGI on WordPress?

For data that’s been cached, the two caches should perform equivalent. In general, most folks will find that WP-Supercache is easier to setup and use from an admin perspective (purging & pre-populating). People cache for two reasons: 1) Improved concurrency at handling many visitors simultaneously. This is only relevant to high-traffic sites. For this, both … Read more

Check if a user is connected and get is ID without fully loading wordpress

WordPress stores user_name of logged in user in auth cookie. Auth cookie is signed, so it’s easy to check if it’s fake, so you can trust this info. OK, so how to get user’s user_name from cookie? There is function for that 😉 wp_parse_auth_cookie and this is what it returns: return compact( ‘username’, ‘expiration’, ‘token’, … Read more

Possible to configure nginx to ignore cache for logged in users in certain roles only?

Here is what I ended up doing: // Set disable cache for certain roles add_action(‘init’, ‘add_custom_cookie_admin’); function add_custom_cookie_admin() { if ( is_user_logged_in() ) { $current_user = wp_get_current_user(); $thisrole = $current_user->roles[0]; if($thisrole !== ‘subscriber’) { setcookie(“disable_cache”, $current_user->user_login, time()+43200, COOKIEPATH, COOKIE_DOMAIN); } } } // and then remove the cookie on logout function clear_custom_cookie_on_logout() { unset($_COOKIE[“disable_cache”]); setcookie( … Read more

W3 total Cache – Site with query strings

W3TC “Accepted query strings:” makes listed query strings ignorable: https://github.com/szepeviktor/w3-total-cache-fixed/pull/380 My current list is: utm_source utm_medium gclid This way these pages: /page /page?utm_source=blabla&utm_medium=email /page?glcid=y349untg93h45t are served from page enhanced cache as for /page

techhipbettruvabetnorabahisbahis forumuedusedusedusedueduseduedueduseduedus