Never-Ending Pagination in WordPress

Take your site’s slideshows to the next level with the following: The next part actually filters the wp_link_pages arguments and decides where to put a next button where one didn’t previously exist. I also threw in an additional previous button, which uses some javascript to take the user back to the previous page. There’s probably […]

Relating a MySQL Process to Server Process

All of this assumes LAMP (specifically CentOS 6, MySQL server 5.5, Apache 2+ with mod-status enabled) On mysql server: watch -n 1 “mysql -e ‘show processlist’;” Look for sleeping connections that are staying open for a while. Watch for a trend. When you see a connection that you think will stay open for long enough, […]

SQL_CALC_FOUND_ROWS and no_found_rows

By default, the WordPress SQL query that selects posts from the database will use “SELECT SQL_CALC_FOUND_ROWS …”. This is mainly for pagination purposes, to speed up subsequent queries for the next set of results. Writing the query that way certainly helps speed up the site as a whole, but is useless in some circumstances. Remedy: […]