Linux 软件免费装
Banner图

Lightweight Sitemap Generator

开发者 andreyberestov
更新时间 2025年10月21日 06:05
捐献地址: 去捐款
PHP版本: 7.0 及以上
WordPress版本: 6.8
版权: GPLv2 or later
版权网址: 版权信息

标签

google sitemap yandex xml sitemap site map

下载

1.0.4 1.0.1 1.0.11 1.0.9 1.0.7 1.0.15 1.0.16 1.0.2 1.0.6 1.0.8 1.0.10 1.0.12 1.0.13 1.0.14 1.0.17 1.0.5 1.0.3

详情介绍:

Lightweight Sitemap Generator is a minimal yet powerful WordPress plugin that creates a valid XML sitemap for search engines (Google, Yandex and others), fully compliant with sitemaps.org. Main features:

安装:

  1. Upload the plugin folder to /wp-content/plugins/ or install via Plugins → Add New.
  2. Activate the plugin in the WordPress admin.
  3. A new menu item Lightweight Sitemap will appear in the admin sidebar. Open it, configure the options you need, and click Generate / Update sitemap.
  4. Your sitemap will be available at: https://example.com/sitemap.xml

屏幕截图:

  • Example of generated XML sitemap.

升级注意事项:

1.0.17 Improved reliability of filesystem permission checks. The permission probe cache is now invalidated both after successful and failed sitemap generation, ensuring the admin UI always reflects the current write-access state. 1.0.16 Improved performance of admin permission checks. 1.0.15 Internal code refactoring to improve readability and bring admin page markup in line with HTML5 standards. This update is fully compatible and safe to install. 1.0.14 Codebase cleaned and formatted for WordPress standards. The "noindex, follow" header option is now shown only when Dynamic mode is active. 1.0.13 Improved interface, faster file handling, optional conflict checker and X-Robots-Tag support, plus diagnostic header display and many small fixes. Recommended update for all users. 1.0.12 Performance and usability update:
  • Added manual/automatic preview toggle.
  • Faster admin load on large sites.
  • Unified notices and button labels. Recommended update for all users.
1.0.11 Major performance and stability update:
  • Streaming preview engine identical to XML output.
  • Optimized dynamic index generation and memory handling.
  • Improved admin reliability and compatibility (PHP 7.0–8.4). Recommended update for all users.
1.0.10 Improved performance, scalability, and PHP 7.0–8.4 compatibility. 1.0.9
  • Raised minimum PHP version to 7.0 for better generator stability.
1.0.8 Maintenance and performance update — introduces a new streaming split mode for large sitemaps, adds ETag/304 caching, and improves sanitization and stability. Recommended for all users. 1.0.7 Minor UI update: unified and simplified “Preview” and “On-disk sitemap” sections for a cleaner look and better readability. 1.0.6 Improved admin interface: unified homepage mode names, compact “LW Sitemap” menu title, and new two-column layout (Preview + On-disk) with 1-hour caching and “Recalculate preview” button. Recommended update for all users — improves clarity, stability, and compatibility. 1.0.5 Translations update. The plugin now relies on official WordPress.org language packs and no longer includes outdated local .mo/.po files. Recommended update for all sites using non-English locales. 1.0.4 New “Conservative” homepage mode + a top “Generate / Update” button (File mode only). Smart mode now respects enabled custom post types. Recommended update. 1.0.3 Major performance upgrade for taxonomy (bulk SQL). Optional soft cap available via filter. Recommended update for large sites. 1.0.2 Major update: adds support for custom post types and taxonomies, and improves <lastmod> for categories, tags, authors, and date archives. Recommended update for better indexing. 1.0.1 Security and stability update. Please upgrade to ensure compatibility with the WordPress.org Plugin Directory requirements. 1.0.0 First stable release. Major improvements: smart homepage <lastmod>, split mode, improved dynamic caching, better security and compatibility.

常见问题:

I see a conflict warning with another SEO plugin. Should I worry?

No. 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.

Why doesn’t the plugin split the sitemap into multiple files by category (like the default WordPress sitemap)?

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:

  • All important URLs are listed.
  • Each URL has a correct <loc> and (optionally) <lastmod>.
  • The sitemap is valid XML and under the 50,000 URL / 50 MB per file limit. The plugin keeps one clean sitemap (with automatic split into parts only when necessary). This avoids clutter, reduces confusion for users, and keeps things minimal yet powerful.

Why doesn’t the plugin include "priority" or "changefreq" tags?

These optional fields (<priority> and <changefreq>) were part of the early sitemap protocol but are ignored by all major search engines today.

  • Google officially states that these values are not used for crawling or ranking decisions.
  • Yandex also ignores them and relies only on <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.

Why doesn't the plugin include images or videos in the sitemap?

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.

Do I need to ping Google or other search engines when the sitemap is updated?

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.

Which plugins are supported?

  • WooCommerce (version 2.6 and above) — simple & grouped products
  • DW Question Answer (version 1.4.3.4 and above) — published Q&A pages
  • Any plugin that registers a public custom post type or public custom taxonomy — detected automatically. This means the plugin can support almost any third-party extension (portfolio plugins, directory listings, events, job boards, and more), as long as the post type or taxonomy is registered in WordPress as public.

How can I verify that dynamic mode works?

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.

Do I need to edit robots.txt?

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.

How can I limit taxonomy calculation for very large sites?

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.

How is the sitemap generated?

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.

  • Dynamic single-file (no split) — builds the full list of URLs in memory and returns a single XML file.
  • Dynamic + Split — when splitting is enabled, you can choose between two engines:
  • Dynamic-Single (default) — fast in-memory build for both index and parts; recommended for most sites.
  • Dynamic-Part-Stream — streaming generation with bounded memory for both index and parts; ideal for very large sites.
Automatic engine fallback By default, automatic fallback is disabled. Administrators can enable it by using the filter below: // 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.

What is the "Robots noindex, follow" header and why is it available only in Dynamic mode?

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:

  • In Dynamic mode, sitemaps are served through PHP (not as static .xml files), so the plugin can safely inject custom HTTP headers.
  • In File mode, the sitemap is a physical XML file on disk. Static files are served directly by the web server (Apache, Nginx, etc.), and PHP cannot modify HTTP headers for them.
If you need the same behavior in File mode, you can manually add this header in your web server configuration, for example in .htaccess: <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.

更新日志:

1.0.17 1.0.16 1.0.15 1.0.14 1.0.13 1.0.12 1.0.11 1.0.10 1.0.9 1.0.8 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0