monstajamss's avatar

XML Pagination

I am trying to create a custom sitemap like popular wordpress plugin Yoast which was created using PHP. But i am unsure how they create pagination for there sitemap like the one in this website https://www.naijavibes.com/sitemap_index.xml.

Once the total sitemap passes 1000 another sitemap is created adding a number to the back.

How can i do this using laravel.

I know there is a package (spatie) but i am not sure if it would work.

0 likes
8 replies
monstajamss's avatar

@Sinnbeck Oh yeah i saw that post as i was researching but i do not understand how to break it into smaller sitemaps using laravel ofcourse.

monstajamss's avatar

@Sinnbeck so i am guessing if i want to follow yoast style i would have to keep adding each sitemap to the index if the url is more than 1000

Sinnbeck's avatar

@monstajamss so all pages are of the same type? My suggestion was to have a sitemap per type. Are all +1000 pages of type post?

Sinnbeck's avatar

Go to the page of that package and read from

Creating a sitemap index

1 like

Please or to participate in this conversation.