Skip to content

TheCodeCompany/yoast-sitemap-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Yoast Sitemap CLI

Yoast Sitemap CLI is a WordPress plugin which provides a WP CLI command to build and cache the root sitemap generated by Yoast. This helps avoid the performance impacts caused to large sites when Yoast attempts to build the sitemap dynamically when it is requested.

This plugin adds the following WP CLI command to generate and cache the root sitemap:

wp yoast-sitemap-build-root

This will generate the root sitemap and store it as a vanilla XML file in the uploads directory. This will be automatically served when you hit the root sitemap index defined by Yoast. I.e. https://yoursite.com/sitemap_index.xml.

Set Up

This command should be configured to run via a cron every 10 mins or so, like so:

*/10 * * * * cd /srv/www/mysite/current && wp yoast-sitemap-build-root --url="https://yoursite.com" 2>&1 2>/dev/null

About

Yoast Sitemap WP CLI plugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages