Your blog page lists the latest ten posts and a “Next” or “2” link at the bottom. Click it and you get “Page not found”. Or the second page loads, but it shows the same ten posts as the first. Or there is no link at all, and anything older than the first screen is unreachable for visitors and, quite possibly, for search engines too.
WordPress pagination not working is rarely random. Each of those three shapes points at a fairly short list of causes, and one cause in particular, a mismatch between two different “posts per page” numbers, turns up again and again. This guide explains that first, because once it makes sense the rest of the fixes do too.
How WordPress decides whether page 2 exists
When someone requests an address such as /blog/page/2/, WordPress runs what is called the main query before the theme displays anything. The main query works out which posts belong on that page using the number set under Settings, then Reading, in the field “Blog pages show at most”. If you have 25 posts and that number is 10, the main query knows there are three pages. Ask it for page 4 and it returns a 404.
Many themes and page builders then ignore the main query’s posts and run their own list, with their own number per page. If the two numbers disagree, WordPress may decide a page does not exist even though the theme’s list would have had posts to show on it. The visitor gets a 404 for a page that should be there.
A worked example
Say your blog template shows 6 posts per page in a nice grid, and Settings, then Reading says 10. You have 20 posts. The grid needs four pages. The main query thinks there are only two. Page 2 works, page 3 and page 4 return a 404.
The fix in most cases is simple: make the two numbers the same. Set “Blog pages show at most” to match what your theme or builder shows, or change the theme’s setting to match. Test pages 2, 3 and the last page afterwards.
Shape 1: page 2 shows 404
Work through these causes in roughly this order.
- The per-page mismatch above. Check it first, especially if only the later pages fail.
- Stale rewrite rules. Go to Settings, then Permalinks and click Save Changes without changing anything. WordPress rebuilds its address rules. This helps most when pagination broke after adding a plugin that registers a new content type, such as portfolios or events. If all inner pages are failing, not just pagination, the guide on inner pages returning 404 with permalinks is the better place to start.
- A slug clash. If you have a normal page called “portfolio” and a plugin also uses /portfolio/ as the archive address for a content type, WordPress has two candidates for the same address. Page 1 may load one, and /portfolio/page/2/ may be read as the other. Rename the page’s slug, or change the content type’s archive setting in the plugin that creates it.
- A redirect or security rule. Redirect managers sometimes include a rule that matches /page/ addresses by accident. Check the redirect list for broad patterns.
Shape 2: page 2 shows the same posts as page 1
The address changes, the page number in the pagination links changes, but the content does not. This almost always means the list on the page is a custom one that has not been told which page it is on.
In a classic theme or custom template
A developer who writes a custom post list has to pass the current page number into it. Without that, the list always starts from the newest post. There is an extra twist: on a page set as the site’s static front page, WordPress stores the page number in a different variable from the one used on normal archives. Code that reads only one of them works on /blog/page/2/ and fails on the home page, or the reverse. You cannot fix either from the dashboard; note the address and pass it to whoever maintains the theme.
In a block theme
The Query Loop block has a setting, “Inherit query from template”. With it on, the loop follows the main query and pagination behaves like a normal archive. With it off, the loop runs its own query and its Pagination block uses its own page parameter in the address. Problems tend to appear when the setting has been switched off on an archive template, or when a page contains two Query Loops and the pagination controls the wrong one. Open the template, select the Query Loop block and check that setting first.
Caching
Less often, a cache stores page 2 under the same key as page 1. You see the right content when logged in and the wrong content in a private window. Purge every cache layer and test again. If that fixes it, look at whether your caching plugin or CDN is ignoring part of the address.
Shape 3: no pagination links at all
When the links are simply missing:
- The template does not include them. Some builder post-list widgets have pagination switched off by default. Open the widget’s settings and look for a “Pagination” option with choices like numbers, previous/next or load more.
- Not enough posts. If the per-page number is higher than your total posts, there is only one page. That is correct behaviour, not a fault.
- A block theme template without a Pagination block. Add it inside the Query Loop.
- CSS hiding the links. Inspect the bottom of the list in the browser. If the links are in the code but invisible, a stylesheet is hiding them.
“Load more” and infinite scroll
Buttons that load extra posts without changing the page, and infinite scroll, depend on JavaScript and usually on a background request to the site. If the button spins and nothing appears, open the browser console (F12) and look for red errors or failed requests in the Network tab. A firewall blocking those background requests, or a script error elsewhere on the page, are the usual causes. It is also worth knowing that search engines may not click a “load more” button, so older posts behind it can be hard for them to reach unless real page links exist too.
Pagination in other places
WordPress pagination not working is not limited to the blog. The same logic applies wherever WordPress lists things in pages:
- Category and tag archives use the same “Blog pages show at most” number, so a mismatch there causes the same 404s.
- Search results run across pages too. If “next page” of results fails, the causes overlap with the ones here, and the guide to fixing a site search that finds nothing covers the search side.
- WooCommerce shop pages often take products per page from the theme or from the Customizer’s WooCommerce settings rather than from Settings, then Reading. If the shop’s page 2 returns a 404 while the blog works, compare those numbers.
- Posts split with the Page Break block use addresses like /post-name/2/. Those are a separate system from archive pagination; if they fail, re-save permalinks first.
Workarounds that cause new problems
A few quick fixes get passed around for this problem. They are worth avoiding.
- Setting “Blog pages show at most” to 1. This makes the main query believe there are as many pages as there are posts, so the 404s stop. But pages that should not exist, such as /page/15/ on a blog with 20 posts shown six to a page, now load as empty lists instead of returning a proper 404. You have hidden the mismatch rather than fixed it, and other archives that rely on the setting will now show one post per page.
- Redirecting every 404 to the home page. Visitors stop seeing the error, but older posts are still unreachable, and search engines get a confusing signal about what exists.
- Swapping to a different pagination plugin. If the real cause is a custom list ignoring the page number, a new plugin draws new links over the same broken list.
The durable fix is always the one that makes the list on screen and the main query agree about how many posts belong on each page.
Check what search engines see
A broken page 2 does more than annoy visitors. If crawlers cannot reach your older posts through pagination, those posts depend entirely on internal links and the sitemap to be found. Make sure your XML sitemap lists them; our guide on a WordPress sitemap that returns 404 helps if it does not open. Once pagination is fixed, open pages 2 and 3 in a private window and confirm they return real content, not a soft “nothing here” message.
Before you report WordPress pagination not working
- The exact addresses that fail: page 2 only, or page 3 onward
- Your “Blog pages show at most” number, and how many posts the theme actually shows per page
- Whether the list comes from the theme, a block template or a page builder widget
- Whether the blog is your static front page or a separate page
Those four facts usually point straight at the cause. If the answer is custom template code that needs the page number passed in properly, that is a small, well-defined piece of bug fixing for wordpress sites. Other listing faults across the site are mapped in our guide to WordPress errors.
Compare those two per-page numbers before you touch anything else. Often, making them match is the whole repair.
Next in this series: WordPress Featured Image Not Showing? Find Where