As per MySQL documentation the FOUND_ROWS function in conjunction with the SQL_CALC_FOUND_ROWS function are deprecated as of MySQL version 8.0.17. This causes the pagination in Wordpress to be broken, both in the front-end as well as in the back-end, resulting in just showing page 1 only.
This plugin solves the issue Wordpress is facing when run under newer versions of MySQL database. By hooking into the query that is used to calculate the number of found posts, we return the right amount of posts found so the pagination can be build up correctly again.
This plugin can be installed like any other plugin.
INSTALL FROM WITHIN WORDPRESS
- Visit the plugins page within your dashboard and select ‘Add New’;
- Search for ‘Count Pagination Fix for MySQL’;
- Install the plugin;
- Activate the plugin from your Plugins page;
INSTALL MANUALLY
- Download the plugin for the Wordpress repository and unpack;
- Upload the ‘count-pagination-fix’ folder to the /wp-content/plugins/ directory;
- Activate the plugin through the ‘Plugins’ menu in WordPress;
AFTER ACTIVATION
There are no settings or configurations for this plugin. Just activate and enjoy the pagination again.
1.1
Release date: 2023-12-07
Rename plugin to match naming conventions.
1.0
Release date: 2023-09-28
Initial release of the plugin, fixing the pagination for post type archive pages and taxonomy archive pages, both on front-end and in back-end.