Co-Authors Plus Global Filter

This notice relates to the following platforms: WordPress.com VIP, VIP Go

This post is regarding the VIP plugin Co-Authors Plus (all versions).

Co-Authors Plus has an expensive join query on author pages, which performs a lookup using both the term and post_author columns.  Unfortunately, this can lead to slow or killed author queries on sites with large databases or high traffic.  To prevent this from occurring and to improve performance, we will be adding the coauthors_plus_should_query_post_author filter to all VIP sites using the Co-Authors-Plus plugin on WordPress.com via:

add_filter( 'coauthors_plus_should_query_post_author', '__return_false' );

This filter disables the compatibility mode and instead, uses a simpler, tax-only query and thus, results in a faster query because we are no longer performing a lookup on the  post_author column.  The compatibility mode is enabled by default in the plugin to ensure that any posts added prior to plugin activation will display properly, as they may not have the proper author terms associated.  However, as a precaution, one of the preparation steps that we have undertook involved running a script to back fill the associated author terms on all posts.

When will this be effective?

This filter will be added to the WordPress.com VIP platform on Tuesday, November 14 (subject to change if any critical issues are discovered prior).

We are planning on adding this to the VIP Go platform eventually and we will announce a date when that will occur.  If you don’t want to wait until the expected TBA date, feel free to add the filter to your VIP Go site.  Please request to have the following WP CLI command wp co-authors-plus create-terms-for-posts run prior to adding the filter to back fill author data on all posts.

What do I need to do?

Once the change has been deployed, please test your site (especially the author pages) to ensure that everything is working as expected.  We do not foresee any major issues that could arise, but if you wish to test the change prior to the scheduled date, feel free to add the filter to your theme.

If you have any concerns or suggestions, please get in touch by leaving a comment below!