https://github.com/pingcap/wordpress-tidb-plugin
https://github.com/pingcap/wordpress-tidb-plugin
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pingcap/wordpress-tidb-plugin
- Owner: pingcap
- License: gpl-3.0
- Created: 2023-11-07T15:53:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-08T05:19:27.000Z (about 2 years ago)
- Last Synced: 2025-03-22T16:02:21.871Z (11 months ago)
- Language: PHP
- Size: 39.1 KB
- Stars: 12
- Watchers: 11
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TiDB Compatibility Plugin for WordPress
TiDB Compatibility Plugin for WordPress
[TiDB](https://en.pingcap.com) is a high-performance database that is compatible with the MySQL protocol. Since MySQL has deprecated the `SQL_CALC_FOUND_ROWS` function, TiDB also has no intention of offering the `SQL_CALC_FOUND_ROWS function`. This leads to an error in WordPress when using TiDB, indicating that `SQL_CALC_FOUND_ROWS` is not supported, and submissions cannot be displayed correctly.
WordPress is also currently working on this issue, but it seems that more time is needed.
[#47280 Remove usage of deprecated MySQL SQL_CALC_FOUND_ROWS from WP_Query](https://github.com/WordPress/wordpress-develop/pull/3863)
This plugin solves the issue of TiDB not providing the `SQL_CALC_FOUND_ROWS function`. **Once this plugin is activated, parts of `WP_Query` that use `SQL_CALC_FOUND_ROWS` will be replaced with the `COUNT(*)` function.**
This plugin is entirely based on the method mentioned by [@akramipro](https://github.com/AkramiPro) in the [article](https://core.trac.wordpress.org/ticket/47280), and this solution works perfectly and addresses the issue. I've turned this method into a plugin so that those using TiDB can easily resolve this problem. Many thanks to [@akramipro](https://github.com/AkramiPro) for the excellent work, and I hope the official WordPress team can address this issue sooner.
### How to install WordPress TiDB Plugin
#### Manually Installing a WordPress Plugin
Download the Plugin: First, download the plugin from the source. It will typically be in a .zip format.
Access Your Website's File Manager: You can do this through your web hosting control panel (like cPanel) or via an FTP client.
Upload the Plugin: Navigate to the 'wp-content/plugins' directory. Upload the plugin .zip file here.
Extract the Plugin: After uploading, extract the .zip file. This will create a new folder with the plugin files.
Activate the Plugin: Go to your WordPress admin area. Click on 'Plugins' in the menu, find your newly uploaded plugin and click 'Activate'.