Point static content like css and js to cookieless subdomain
You can use a fantastic plugin called CDN Linker.
You can use a fantastic plugin called CDN Linker.
I use W3 Total Cache as well, so I double checked on my site to see what headers are being sent … and images are not sending anything that varies on User Agent. An example image response header: HTTP/1.1 200 OK Server: nginx Date: Tue, 27 Mar 2012 15:48:18 GMT Content-Type: image/png Transfer-Encoding: chunked Connection: … Read more
The crude alternative most people resort to is the one where you add a file and include several levels up. This is arguably worse for performance if not just as bad. But there is a variant that works better, if we create our own AJAX entrypoint URL, and specify: define( ‘SHORTINIT’,true); Then include the WordPress … Read more
I am not completely sure what you are talking about so I will mention the possibilities that come to mind. Maybe this… // Keep track of the last query for debug.. $this->last_query = $query; http://core.trac.wordpress.org/browser/tags/3.5.2/wp-includes/wp-db.php#L1195 … is what you are talking about. If so, your code just runs the flush method which resets $wpdb properties … Read more
I think there’s no really huge difference, you choose the tool that you feel most comfortable yourself. Plugins have the drawbacks you mentioned, and doing them from scratch can be a bit slow and tedious. The 3rd alternative, that I find really good, is a PHP class that does all the heavy lifting for you, … Read more
There’s an amazing plugin (as usual) called Query Monitor that will give you an amazing set of stats about all the queries run on a page load. You can see how many queries are made, by which components, how long they take – pretty much everything. I wouldn’t necessarily run this on a live site … Read more
In the case where you want to store each piece of data as a unique entry (row) in the database, then a custom table, as you’ve already done, is a perfectly fine solution. On the other hand… You could use the usermeta table to do the exact same thing, storing multiple meta keys with the … Read more
It depends on what you need. The software environment is the same you need for every other PHP site where you want to get an efficient workflow: up-to-date PHP (currently 5.5, so you can use Opcache) with at least 128 MB memory limit the same for MySQL web server with a rewrite engine regular backups … Read more
I’ve already fixed it. I simply had to go to WPML > Languages, and uncheck “Adjust IDs for multilingual functionality” which dramatically increased the performance of the translated version of the website, and I no longer get a PHP notice.
According to user Otto, who provides a good explanatory answer to a similar question, you can safely call wp_get_post_terms() a number of times because WordPress’s internal query caching system is primed before the loop begins, and subsequent calls to wp_get_post_terms() will hit the cache rather than the query: Post meta information is automatically cached in … Read more