One of the issues people have with WordPress when first starting out is “WordPress Pagination”. Pagination in WordPress is the ability to call a query of posts and have the site dynamically call them. You can configure a certain amount of posts per page either within the query or in the WordPress options.
When looking for WordPress Pagination 404 Errors on the internet I came across many things that can cause those types of errors. The typical candidates are:
- Improper coding of the loop
- Improper coding of the Next page / Previous Page
- A folder that conflicts with the Permalink structure.
So what was causing my issues? Well I had a similar issue and it behaved almost identically to the “folder that conflicts with the Permalink structure” error. I had created a page inside WordPress called:
On this page I wanted to display all the items in my portfolio. However because I like descriptive URLs I configured the URL to also have the word portfolio on all categories as well. To do this I configured my “Category base” to be “Portfolio” (see screenshot below). If I was on any other page that required Pagination everything worked. However when I was on the “Portfolio” page it didn’t work because the category base was getting confused with the actual page. It would show the first page but not the rest. The subsequent pages would all come up with a 404 Error.
Here’s the Permalink Settings options in WordPress.
Anyways… To resolve my issue I went back to page “Portfolio” and renamed the URL from “portfolio” to “online-portfolio” and Voila. Everything works as expected. You can see from the screenshot how the URL was effected.