| 开发者 | elfifou |
|---|---|
| 更新时间 | 2026年11月28日 22:34 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
wp lostlink list [--limit=<n>] [--format=<format>]: the broken URLs, most hit first.wp lostlink referers <path>: the referers of a broken URL.wp lostlink suggest <path> [--limit=<n>] [--min-score=<percent>]: the suggested targets.wp lostlink import-redirection: imports the 404 log of the Redirection plugin.wp lostlink maintenance: runs the hourly purge now.lostlink_should_record (skip some 404s), lostlink_candidate_paths (add redirect targets), lostlink_path_language (language of a path, for multilingual plugins other than Polylang), lostlink_capability and lostlink_settings_capability (who can use the dashboard and change the settings).
Privacy
Lostlink stores, in its own tables, the path of each URL that returned a 404 (without its query string), the referers sent by the browsers, hit counts and dates, and for each redirect the ID of the user who created it. It stores no IP address, no user agent and no cookie, and sends nothing to any third-party service.
A referer is the address of the page a visitor came from, and can contain personal data in its query string: referers are deleted after 90 days without a hit, and capped per URL (both settings). Lostlink adds a suggested paragraph to the privacy policy guide (Settings > Privacy). Deleting the plugin removes all its data.
No. Lostlink has its own redirects. When Redirection is set up, Lostlink creates the redirects there by default, which can be changed in the settings.
Only 404s cost anything: a few database writes per 404, and a lookup of the built-in redirects. Other pages are not affected, and no script is added to them.
Only the 404s served by WordPress itself. Requests the web server answers without loading WordPress are not seen, such as missing images, CSS and JS files on nginx setups that serve static files directly. 404 pages served by a page cache are counted through a script, so only for visitors running JavaScript, which leaves out most bots. Malformed URLs (an invalid percent-encoding, an encoded control character) and URLs longer than 2,048 characters are ignored.
By default at most 10,000 broken URLs (the least recently hit are purged first), 50 referers per URL, deleted after 90 days without hits, and 14 days of daily history. The limits are configurable in the Settings tab, and the purge runs hourly with WP-Cron: on a site without visits, or with WP-Cron disabled and no system cron, it is delayed.
One exact path each, compared case-insensitively and with or without a trailing slash; the query string of the request is passed on. Wildcards and regular expressions are not supported: use the Redirection plugin for them. A built-in redirect only applies when the URL returns a 404.
The 5,000 most recently modified published posts and pages and the 2,000 most used terms, to bound the time of a rebuild on large sites, plus the URLs of a sitemap when one is set in the settings (up to 50 files and 20,000 URLs). Suggestions need permalinks other than "Plain".
Polylang is supported. With other multilingual plugins, including WPML, recording and redirects work as on any site, and the language of the suggestions can be provided with the lostlink_path_language filter. Post type archives are only suggested in the current language.
Each site of a network has its own data and settings, but it is not tested on multisite, and uninstalling only removes the data of the current site.
Ask for help in the support forum. Bugs and feature requests are welcome in the GitHub issues of the plugin.
Please don't post it publicly: report it privately from the Security tab of the GitHub repository, with "Report a vulnerability".