> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trysight.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# WordPress Sitemap Not Updating

> How to fix WordPress sitemap caching issues that prevent new articles from being detected.

## The Problem

Your Sight AI dashboard shows the same **Total URLs** count even though you're regularly publishing new articles to your WordPress site. The URL count appears stuck, and new posts aren't showing up in your Activity Feed.

## Why This Happens

Sight AI crawls your sitemap every hour to detect new URLs. When you publish a new article, your WordPress SEO plugin (Yoast SEO, RankMath, AIOSEO, etc.) should automatically regenerate the sitemap to include it. However, if a **caching layer** is serving an old version of your sitemap, Sight AI only sees the stale copy -- even though the articles are live on your site.

This is the most common cause of a "stuck" URL count on WordPress sites.

## How to Confirm This Is Your Issue

### Step 1: Check if a new article is missing from your sitemap

1. Open a recently published article on your site and copy the URL
2. Open your sitemap in a new tab: `https://yoursite.com/sitemap_index.xml`
3. Click into your post sitemap (usually `post-sitemap.xml`)
4. Use **Ctrl+F** (or **Cmd+F** on Mac) to search for your article URL
5. If the article is live on your site but **not in the sitemap**, you have a caching issue

### Step 2: Check the sitemap's last modified date

Look at the `<lastmod>` date in your sitemap index. If it shows a date from days or weeks ago rather than today, the sitemap is being served from cache.

### Step 3: Check HTTP headers (advanced)

Open your browser's Developer Tools (F12), go to the **Network** tab, and load your sitemap URL. Look for these headers in the response:

* `x-cache-age` -- if this shows a large number, your sitemap is cached
* `cf-cache-status: HIT` -- Cloudflare is serving a cached version
* `x-litespeed-cache: hit` -- LiteSpeed Cache is active

## Common Causes and Fixes

### 1. WordPress Caching Plugin

**Affected plugins:** WP Rocket, W3 Total Cache, WP Super Cache, LiteSpeed Cache, Breeze, WP Fastest Cache, Hummingbird, and others.

Most caching plugins cache all server responses by default, including sitemap XML files. You need to exclude sitemaps from your cache.

#### WP Rocket

1. Go to **WP Rocket -> Advanced Rules -> Never Cache URLs**
2. Add these patterns:
   `/sitemap_index.xml`
   `/(.*)sitemap(.*)\.xml`
3. Click **Save Changes**, then **Clear Cache**

#### W3 Total Cache

1. Go to **Performance -> Page Cache -> Advanced**
2. Add sitemap URLs to the **Never cache** list
3. Purge all caches

#### LiteSpeed Cache

1. Go to **LiteSpeed Cache -> Cache -> Excludes -> Do Not Cache URIs**
2. Add: `/sitemap`
3. Purge cache from **LiteSpeed Cache -> Toolbox -> Purge All**

#### WP Super Cache

1. Go to **Settings -> WP Super Cache -> Advanced -> Rejected Strings**
2. Add: `sitemap`

#### Breeze (Cloudways)

1. Go to **Settings -> Breeze -> Advanced Options -> Never Cache URLs**
2. Add: `/sitemap`
3. Clear cache from **Settings -> Breeze -> Basic Options**

#### Any other caching plugin

Look for "exclude URLs" or "never cache" settings and add your sitemap URL patterns. Then clear/purge the entire cache.

### 2. Cloudflare CDN Caching

Cloudflare can cache XML responses at the edge and serve stale sitemaps to Sight AI.

1. Log into your [Cloudflare Dashboard](https://dash.cloudflare.com/)
2. Go to **Caching -> Cache Rules**
3. Create a new rule:
   * **When:** URI Path contains `sitemap` AND URI Path contains `.xml`
   * **Then:** Cache eligibility = **Bypass cache**
4. Save and deploy the rule
5. Go to **Caching -> Configuration** and click **Purge Everything**

### 3. Server-Level Hosting Cache

Managed WordPress hosts often have server-level caching (Nginx, Varnish) that sits in front of WordPress entirely.

#### WP Engine

Go to your WP Engine dashboard -> Sites -> Your Site -> **Clear All Caches**. Contact WP Engine support to exclude sitemaps from their caching layer.

#### Cloudways (Varnish)

Log into the Cloudways console -> Your Application -> **Varnish** -> click **Purge**. Add sitemap exclusions under Application Settings -> Varnish Settings -> Exclude URLs.

#### Kinsta

Go to your Kinsta dashboard -> Sites -> Your Site -> **Tools -> Clear Cache**. Contact Kinsta support to add sitemap exclusions.

#### SiteGround

Go to **SiteGround Site Tools -> Speed -> Caching** and purge the dynamic cache. Add sitemap exclusions under the cache settings.

#### Other hosts

Contact your hosting provider and ask them to add a cache bypass rule for sitemap XML URLs. They will know how to configure this for their infrastructure.

### 4. SEO Plugin Sitemap Cache

Yoast SEO and RankMath store sitemaps in WordPress transients (an internal cache). Occasionally this cache fails to refresh when new posts are published.

#### Yoast SEO

1. Go to **Yoast SEO -> General -> Features**
2. Toggle the **XML sitemaps** switch **off**
3. Click **Save Changes**
4. Toggle it **back on** and click **Save Changes** again
5. Visit your sitemap to confirm new articles now appear

#### RankMath

1. Go to **RankMath -> Sitemap Settings**
2. Toggle the sitemap module off and back on
3. Or click **Update Sitemap** if available

### 5. Object Cache (Redis / Memcached)

If you're using Redis or Memcached as a WordPress object cache, stale sitemap data may persist even after your SEO plugin regenerates the sitemap.

1. Open the **Redis Object Cache** or **Memcached** plugin in WordPress Admin
2. Click **Flush Cache** or **Flush Object Cache**
3. Alternatively, ask your hosting provider to flush the object cache
4. Check your sitemap to confirm it now includes recent articles

## After Fixing

Once you've cleared the cache and confirmed your sitemap includes the new articles:

1. Sight AI will **automatically detect the new URLs** on the next hourly crawl (within 60 minutes)
2. The **Total URLs** count on your Indexing Activity page will update
3. New URLs will be submitted to Google Search Console and IndexNow (if configured)
4. You'll see a **"New URLs Detected"** entry in your Activity Feed

## How to Prevent This in the Future

* **Always exclude sitemaps from caching** -- add sitemap URL patterns to your cache plugin's exclusion list
* **Test after cache plugin updates** -- caching plugins can reset exclusion rules after updates
* **Test after hosting migrations** -- moving hosts often changes the caching layer
* **Monitor your dashboard** -- if the URL count stops growing while you're publishing, check your sitemap first

## Still Not Updating?

If you've tried all the steps above and your sitemap still isn't updating:

* Check that your articles are set to **Published** status (not Draft or Scheduled)
* Verify your SEO plugin hasn't excluded these posts from the sitemap (look for "noindex" or "exclude from sitemap" in per-post settings)
* Check if your posts use a custom post type that isn't included in the sitemap
* Contact your hosting provider and ask them to verify no server-level caching is affecting sitemap responses

If you're still stuck, reach out to us at [support@trysight.ai](mailto:support@trysight.ai) with your site URL and we can help investigate further.

## Related Articles

* [Monitoring Your Sitemap](/indexing/monitoring)
* [How Indexing Works](/indexing/how-it-works)
* [Google Sitemap Submit](/indexing/google-sitemap)
* [WordPress Integration](/integrations/wordpress)
