Geekflare is supported by our audience. We may earn affiliate commissions from buying links on this site.
Share on:

How to Change Yoast Sitemap Frequency to Daily?

yoast sitemap frequency
Invicti Web Application Security Scanner – the only solution that delivers automatic verification of vulnerabilities with Proof-Based Scanning™.

Yoast SEO for Wordpress is one of the most popular plugins with more than 5 million active installed. Yoast helps you with General SEO, Titles, Metas, Social tags, XML Sitemaps, etc.

If you are using this plugin and access sitemap, you will notice default frequency is weekly for a single post and the home page is daily.

If you are like me looking to change the single post frequency to daily or hourly then the following will help you.

Default sitemap frequency

sitemap-yoast-weekly

I couldn’t find any way to change this using plugin GUI so below hack is done in functions.php of your theme.

As usual, take a backup of functions.php file

  • Add the following to end the file
add_filter( 'wpseo_sitemap_post_single_change_freq', 'my_custom_post_freq', 10, 2 ); 
function my_custom_post_freq( $default, $url ) {    
return 'daily'; 
}
  • Save the file and refresh your sitemap URL

If you are looking to change the frequency to hourly then just change from daily to hourly in return as follows.

add_filter( 'wpseo_sitemap_post_single_change_freq', 'my_custom_post_freq', 10, 2 ); 
function my_custom_post_freq( $default, $url ) {    
return hourly; 
}

This is how my sitemap looks now after changing to daily.

sitemap-yoast-daily

It’s always recommended to make changes in your child themes so when you update your theme you don’t lose the custom changes.

Alternatively, if you are not using child theme then you can use Insert PHP plugin to insert the code.

Much better? Never thought it would be that easy to change the sitemap frequency.

Thanks to our Sponsors
More great readings on SEO
Power Your Business
Some of the tools and services to help your business grow.
  • Invicti uses the Proof-Based Scanning™ to automatically verify the identified vulnerabilities and generate actionable results within just hours.
    Try Invicti
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.
    Try Brightdata
  • Semrush is an all-in-one digital marketing solution with more than 50 tools in SEO, social media, and content marketing.
    Try Semrush
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.
    Try Intruder