The article on wordpress is interesting and true but I’m not sure what’s it’s purpose. The provided code is for cases when you want to do some action for every post ; it doesn’t help with the pagination on site directly.
You may try https://wpartisan.me/tutorials/wordpress-database-queries-speed-sql_calc_found_rows instead, but with million posts, even better would be to completely rethink your pagination ; the “LIMIT 1043000, 70” is very inefficient part.
Related Posts:
- pagination on data fetched using SQL query
- WordPress Cache delete on plugin uninstall
- How to properly insert data into custom table via plugin
- How to get the active theme’s slug?
- Searching users with WP_List_Table plugin
- How can I list only sites that use a particular theme or plugin?
- Which hook callback has priority if both plugin and theme use the same hook?
- Uncaught Error: Call to undefined function get_user_by() after moving function from theme to plugin
- How to add pagination to wpbakery grid?
- add_meta_box (Will display only in specific page admin WordPress)
- How to write one comment and publish on every post using database or plugin?
- How to get number of Affected rows from wordpress dbDelta() function
- Display data on Word Press site posts and pages from mysql table
- How to simultaneously access the same MySQL database in the main column and sidebar of WordPress?
- WpDataTables – View Image Directory
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- All sites themes functions.php have been changed
- Why namespaces are rarely used in WordPress plugins?
- My single.php page does not show the related data to the post which is clicked
- Notice: Uninitialized string offset: 0 in social sharing mu-plugin
- Using ‘mysqli_connect’ ‘crashes’ WordPress client-side
- how can I do something on new user registration?
- Use $variable from file1.php in file2.php (different file paths)
- How to make a dynamic css class whose name changes every visit to confuse scraper
- I receive taxonomy id
- How can I fetch data from another website to my wordpress website with mysql database
- How to include files relative to a file’s directory
- Way to send multiple values for column to MySQL?
- Inserting Plugins Into Blank Space of Externally Designed WordPress Theme
- How to display results from a data table with an encrypted user id?
- Pagination not working
- Check against server time to display SQL entries – Radio Station DJ Rotator Plugin
- add_action for publish_post doesn’t work
- Plugin Admin panel checkbox unchecked after submit
- uncaught TypeError: Cannot read properties of null (reading ‘classList’) custom plugin
- Custom Plugin scripts from admin working in frontend
- need to find duplicated meta value in custom filed and view the posts that have the same value
- Getting current user data with MySQL statement
- How to get the custom field value using SQL query
- Replace old theme that understand old css (vcex_icon_box css_animation)
- WP Function does not trigger on Webhook API Call
- Cant create table on plugin activation
- How to get database connection details without longing to cpanel in WordPress?
- Remove a div class with condition
- Hooking into the HTML header container
- How to get a post views count using ‘WordPress popular posts’ plugin
- Moving a few select DB tables to a new WP instance
- How much PHP and MySQL or MariaDB knowledge should I know to start writing WordPress themes and plug-ins and whatever else a beginner can edit?
- How can I make the search bar in my wordpress site search all of the pages rather than just the blog posts?
- I want add repository theme folder
- get/show Last ID
- Things that saved lose when logout
- Woocommerce: deleted single-product.php, everything still works. How is it possible?
- What is the process for reimplementing a back up WordPress?
- Template from scratch: Sidebars not showing widget
- MySql Query for WordPress
- Display static pages instead of category, in code
- how to search through plugin in wordpress cimy-user-extra-fields?
- wordpress illegal string offset ‘parameter’ error
- Two sites one PC
- PHP Creating a formula from mysql db values and db stored math operator
- Real estate schema markup not showing up on Rich Results test
- Split Million WordPress Post’s Into Multiple Database Server
- Getting 504 Gateway Timeout Error on AWS Server! [closed]
- WordPress issue – data is not showing in wp-admin, but when searching through database, all the data is there
- Disable plugin / plugin action via theme
- Simple form that saves to database
- How to call plugin path in JS?
- Get Current user email as a return string value
- How can I make content disappear when a user logs in?
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- Replace existing pages with new pages, keep menu links
- New Plugin: Post update pushes a copy as a revision
- Reusable functions and tools (Framework)
- Why “Call to a member function on a non-object” in plugin only?
- Plugin dropping pagination variable
- What are the specifics of WordPress development I need to know? [closed]
- Insert data from .sql file in wordpress plugin
- How to echo text in browser instead of download junk file?
- Proper way to use plugin functions in functions.php
- Allowing users to Sign-up > Login > Post articles that need approval
- Adding a simple Javascript file with a plugin
- How to add/change (woocommerce) product tab icon
- Don’t load the theme for a page FROM a plugin EDITED
- Equivalent of admin.php for public pages
- Elementor Sidebar not loading when PRO elements plugin is active
- how can we migrate wordpress 5.9 website from aws ec2 to new installed wp 5.9 oci compute
- Editing a coupon generating plugin
- Display pagination in reservation Plugin and and Print table as pdf
- What is the right way to populate a dropdown from MySql?
- make p tag collapsed after 3 rows
- Fatal error: Class ‘RDTheme’ not found
- Generate and send ICS file through WordPress
- WP Plugin permissions – create new files
- Creating Admin Submenu Page via Class Method
- WordPress User Frontend Editing Custom Fields
- How can I modify the colors of my theme for a single section of my site? [closed]
- Fast Tranfering my WordPress site to another server
- Duplicating wordpress install issue
- Predefine Magazine Style Layouts