Count Pagination Fix for MySQL

描述

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 built up correctly again.

安裝

This plugin can be installed like any other plugin.

INSTALL FROM WITHIN WORDPRESS

  1. Visit the plugins page within your dashboard and select ‘Add New’;
  2. Search for ‘Count Pagination Fix for MySQL’;
  3. Install the plugin;
  4. Activate the plugin from your Plugins page;

INSTALL MANUALLY

  1. Download the plugin for the WordPress repository and unpack;
  2. Upload the ‘count-pagination-fix’ folder to the /wp-content/plugins/ directory;
  3. 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.

常見問題

Shouldn’t this functionality be build into the core of WordPress?

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 the corresponding ticket to follow up.

After activating, the pagination is still not fixed, what can I do?

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.

評價

There are no reviews for this plugin.

貢獻者及開發者

“Count Pagination Fix for MySQL” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

Count Pagination Fix for MySQL 外掛目前已有 1 個本地化語言版本。 感謝所有譯者為這個外掛做出的貢獻。

將 Count Pagination Fix for MySQL 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.1.4

Release date: 2025-05-21

Improve SQL_CALC_FOUND_ROWS pattern to fix incorrect MySQL identifier matches

1.1.3

Release date: 2025-04-17

Update WordPress “tested up to” version to 6.8

1.1.2

Release date: 2024-11-07

Update WordPress “tested up to” version to 6.7

1.1.1

Release date: 2024-07-24

Apply more WordPress Coding Standards and update “Tested up to” to latest WordPress version number.

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.