 
            
        
        | 开发者 | andreyberestov | 
|---|---|
| 更新时间 | 2025年10月21日 06:05 | 
| 捐献地址: | 去捐款 | 
| PHP版本: | 7.0 及以上 | 
| WordPress版本: | 6.8 | 
| 版权: | GPLv2 or later | 
| 版权网址: | 版权信息 | 
sitemap.xml with proper <loc> and <lastmod> tags (ISO-8601 UTC format)<lastmod> for homepage:WP_Filesystem (with safe fallback)/wp-content/plugins/ or install via Plugins → Add New.https://example.com/sitemap.xmlNo. The conflict check is purely informational. It just means that another plugin is also generating an XML sitemap. In most cases you can simply disable sitemap generation in that plugin (Yoast SEO, Rank Math, SEOPress, etc.). This does not affect your site’s performance or indexing; it’s just to help avoid confusion.
The native WordPress sitemap (/wp-sitemap.xml) generates multiple files for posts, pages, categories, tags, and other objects.
This structure is not wrong, but it makes things more complex without real SEO benefit.
According to the official sitemaps.org specification and search engine documentation (Google, Yandex, Bing), there is no ranking or indexing advantage in splitting by taxonomy.
Search engines only care that:
<loc> and (optionally) <lastmod>.These optional fields (<priority> and <changefreq>) were part of the early sitemap protocol but are ignored by all major search engines today.
<loc> and <lastmod>.
Including these tags gives a false sense of control without actual effect. That’s why the plugin follows the modern standard: only <loc> and <lastmod> are included, which is exactly what search engines expect and trust.This is intentional. Modern search engines such as Google and Yandex are fully capable of discovering images and videos directly from your pages. Including media entries in the sitemap may significantly increase file size and slow down generation on large sites, without providing real SEO benefits for most users. The plugin focuses on reliability, performance, and standards compliance — keeping the sitemap lightweight, fast to generate, and easy for search engines to crawl. If you run a specialized image or video portal and truly need dedicated media sitemaps, you can safely use this plugin alongside other SEO tools that handle media-specific indexing.
No. Since 2023, Google has officially discontinued support for the legacy ping endpoint.
Search engines now automatically discover and re-fetch sitemap files listed in your robots.txt or previously submitted via Search Console.
Your sitemap will be crawled regularly without any manual “ping”.
Adding extra HTTP requests such as
https://www.google.com/ping?sitemap=https://example.com/sitemap.xml
no longer has any effect and is completely optional.
If you want to ensure fast discovery, just include this line in your robots.txt:
Sitemap: https://example.com/sitemap.xml
That’s all you need — modern search engines periodically check robots.txt and automatically detect sitemap updates.
Open https://yoursite.com/sitemap.xml in browser developer tools or run:
curl -I https://yoursite.com/sitemap.xml
You should see the header X-LWSGP-Mode: dynamic in the response.
If a physical sitemap.xml file exists in the site root, the server may serve it directly (without headers). The plugin will show a warning in the admin panel and let you delete that file.
You can also enable diagnostic comments in the settings.
The plugin does not touch your robots.txt automatically.
It is recommended to add the following line manually:
Sitemap: https://example.com/sitemap.xml
This helps search engines (Google, Yandex, Bing, etc.) to discover your sitemap faster.
This is an advanced option, not required for normal sites.
By default, the plugin calculates <lastmod> for all selected taxonomy term archives (categories, tags, custom taxonomies) using a single optimized SQL query per taxonomy. This is safe and efficient in most cases.
However, on extremely large sites with tens of thousands of terms, you may want to set a soft cap to avoid heavy database operations.
You can do this with a simple filter in your theme’s functions.php or in a small custom plugin:
add_filter('lwsgp_tax_lastmod_cap', function() { return 5000; // maximum number of terms per taxonomy for <lastmod> });
If the number of terms exceeds this cap, the plugin will still include the term URLs in the sitemap, but without <lastmod>. This prevents potential performance issues on very large sites.
The plugin supports both File and Dynamic modes, each with its own generation method. File mode (single or split) A complete list of URLs is built in memory and then written to disk as static XML files. This approach has the lowest runtime cost for visitors because the web server serves the files directly. Dynamic mode (on-the-fly) The sitemap is generated dynamically when requested and cached for speed.
// Return 0 to disable automatic fallback (default). // Return a positive integer to enable fallback when total URLs exceed the threshold. add_filter('lwsgp_dynamic_single_threshold', function () { return 0; // no automatic fallback by default });
Both modes produce identical XML output — they differ only in how data is processed and delivered.
                This is an advanced option, intended for SEO-sensitive configurations.
When enabled, the plugin sends the following HTTP header for dynamically generated sitemap files:
X-Robots-Tag: noindex, follow
This tells search engines not to index the sitemap itself, but still to follow the links inside it.
In practice, this prevents the sitemap XML from appearing in search results, while ensuring that all listed URLs are still crawled and indexed as usual.
The header is available only in Dynamic mode, because:
<FilesMatch "sitemap.*\.xml$"> Header set X-Robots-Tag "noindex, follow" </FilesMatch>
For most sites, leaving this option disabled is perfectly fine. It is recommended mainly for developers, SEO specialists, or agencies who prefer explicit control over how search engines handle sitemap URLs.
                .po/.mo files from the plugin package to avoid conflicts with community translations./languages folder only if no global translation exists.lwsgp_tax_lastmod_cap (default 0 = unlimited).<lastmod> support for categories, tags, author archives, and date archives (based on the latest modified post).<lastmod> timestamps across all archive types.FILTER_UNSAFE_RAW, added stricter sanitization of server variables.X-LWSGP-Cache: FILE for file mode).lwsgp_).<lastmod> calculation (blocks, WooCommerce, DW Q&A).