{"id":182778,"date":"2024-02-13T13:15:08","date_gmt":"2024-02-13T13:15:08","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/mysql-count-for-pagination\/"},"modified":"2025-10-21T10:16:30","modified_gmt":"2025-10-21T10:16:30","slug":"count-pagination-fix","status":"publish","type":"plugin","link":"https:\/\/pcm.wordpress.org\/plugins\/count-pagination-fix\/","author":7726737,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.5","stable_tag":"1.1.5","tested":"6.8.5","requires":"6.0","requires_php":"7.0","requires_plugins":null,"header_name":"Count Pagination Fix for MySQL","header_author":"Team iSide","header_description":"Simple fix for pagination issues under MySQL v8.0 and later where `SQL_CALC_FOUND_ROWS` and `FOUND_ROWS` are no longer supported.","assets_banners_color":"7956f1","last_updated":"2025-10-21 10:16:30","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.iside.be","header_plugin_uri":"","header_author_uri":"https:\/\/www.iside.be","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1374,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1.1":{"tag":"1.1.1","author":"jorisvst","date":"2024-11-07 13:55:04"},"1.1.2":{"tag":"1.1.2","author":"jorisvst","date":"2024-11-07 14:02:46"},"1.1.3":{"tag":"1.1.3","author":"jorisvst","date":"2025-04-17 14:29:09"},"1.1.4":{"tag":"1.1.4","author":"jorisvst","date":"2025-05-21 13:06:04"},"1.1.5":{"tag":"1.1.5","author":"jorisvst","date":"2025-10-21 10:16:30"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3124717,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3124717,"resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":3124717,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3124717,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3124717,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.1","1.1.2","1.1.3","1.1.4","1.1.5"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[442,224383,1627,900,224382],"plugin_category":[],"plugin_contributors":[229948,229949,224384],"plugin_business_model":[],"class_list":["post-182778","plugin","type-plugin","status-publish","hentry","plugin_tags-count","plugin_tags-found_rows","plugin_tags-mysql","plugin_tags-pagination","plugin_tags-sql_calc_found_rows","plugin_contributors-arnodeleeuw","plugin_contributors-jorisvst","plugin_contributors-leendertvb","plugin_committers-arnodeleeuw","plugin_committers-jorisvst","plugin_committers-leendertvb"],"banners":{"banner":"https:\/\/ps.w.org\/count-pagination-fix\/assets\/banner-772x250.png?rev=3124717","banner_2x":"https:\/\/ps.w.org\/count-pagination-fix\/assets\/banner-1544x500.png?rev=3124717","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/count-pagination-fix\/assets\/icon.svg?rev=3124717","icon":"https:\/\/ps.w.org\/count-pagination-fix\/assets\/icon.svg?rev=3124717","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/information-functions.html#function_found-rows\">As per MySQL documentation<\/a> 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.<\/p>\n\n<p>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 built up correctly again.<\/p>\n\n<!--section=installation-->\n<p>This plugin can be installed like any other plugin.<\/p>\n\n<h3>INSTALL FROM WITHIN WORDPRESS<\/h3>\n\n<ol>\n<li>Visit the plugins page within your dashboard and select \u2018Add New\u2019;<\/li>\n<li>Search for \u2018Count Pagination Fix for MySQL\u2019;<\/li>\n<li>Install the plugin;<\/li>\n<li>Activate the plugin from your Plugins page;<\/li>\n<\/ol>\n\n<h3>INSTALL MANUALLY<\/h3>\n\n<ol>\n<li>Download the plugin for the Wordpress repository and unpack;<\/li>\n<li>Upload the \u2018count-pagination-fix\u2019 folder to the \/wp-content\/plugins\/ directory;<\/li>\n<li>Activate the plugin through the \u2018Plugins\u2019 menu in WordPress;<\/li>\n<\/ol>\n\n<h3>AFTER ACTIVATION<\/h3>\n\n<p>There are no settings or configurations for this plugin. Just activate and enjoy the pagination again.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id='shouldn%27t%20this%20functionality%20be%20build%20into%20the%20core%20of%20wordpress%3F'><h3>Shouldn't this functionality be build into the core of Wordpress?<\/h3><\/dt>\n<dd><p>The COUNT function is already available since MySQL v4.0, providing more ways to optimise performance. Preparing for future versions is also important. So we believe that it is important to start working on this. Please refer to <a href=\"https:\/\/core.trac.wordpress.org\/ticket\/47280\">the corresponding ticket<\/a> to follow up.<\/p><\/dd>\n<dt id='after%20activating%2C%20the%20pagination%20is%20still%20not%20fixed%2C%20what%20can%20i%20do%3F'><h3>After activating, the pagination is still not fixed, what can I do?<\/h3><\/dt>\n<dd><p>This plugin has been tested with the major query methods that Wordpress supports. Chances are you are using a plugin that is altering the query in some way or a plugin that uses it's own querying methods. Please let us know if you run into any problems and we will help you work out a solution.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.5<\/h4>\n\n<p>Release date: 2025-10-21<\/p>\n\n<p>Confirmed compatibility with WordPress 6.8.3.<\/p>\n\n<h4>1.1.4<\/h4>\n\n<p>Release date: 2025-05-21<\/p>\n\n<p>Improve SQL_CALC_FOUND_ROWS pattern to fix incorrect MySQL identifier matches.<\/p>\n\n<h4>1.1.3<\/h4>\n\n<p>Release date: 2025-04-17<\/p>\n\n<p>Update WordPress \"tested up to\" version to 6.8.<\/p>\n\n<h4>1.1.2<\/h4>\n\n<p>Release date: 2024-11-07<\/p>\n\n<p>Update WordPress \"tested up to\" version to 6.7.<\/p>\n\n<h4>1.1.1<\/h4>\n\n<p>Release date: 2024-07-24<\/p>\n\n<p>Apply more WordPress Coding Standards and update \"Tested up to\" to latest WordPress version number.<\/p>\n\n<h4>1.1<\/h4>\n\n<p>Release date: 2023-12-07<\/p>\n\n<p>Rename plugin to match naming conventions.<\/p>\n\n<h4>1.0<\/h4>\n\n<p>Release date: 2023-09-28<\/p>\n\n<p>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.<\/p>","raw_excerpt":"Fix for pagination issues under MySQL v8.0 and later where SQL_CALC_FOUND_ROWS and FOUND_ROWS are no longer supported.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/182778","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcm.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcm.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=182778"}],"author":[{"embeddable":true,"href":"https:\/\/pcm.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/leendertvb"}],"wp:attachment":[{"href":"https:\/\/pcm.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=182778"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=182778"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=182778"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=182778"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=182778"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcm.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=182778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}