Title: ToSlug
Author: 老蒋和他的小伙伴
Published: <strong>2026 年 10 月 16 日</strong>
Last modified: 2026 年 10 月 16 日

---

搜索插件

![](https://ps.w.org/toslug/assets/banner-772x250.png?rev=3750061)

![](https://ps.w.org/toslug/assets/icon-256x256.png?rev=3750061)

# ToSlug

 作者：[老蒋和他的小伙伴](https://profiles.wordpress.org/laobuluo/)

[下载](https://downloads.wordpress.org/plugin/toslug.1.2.1.zip)

 * [详情](https://cn.wordpress.org/plugins/toslug/#description)
 * [评价](https://cn.wordpress.org/plugins/toslug/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/toslug/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/toslug/#developers)

 [支持](https://wordpress.org/support/plugin/toslug/)

## 描述

ToSlug is a WordPress plugin that automatically generates URL slugs for posts. It
can create random alphanumeric or MD5-based slugs to help obscure predictable permalink
patterns.

#### Features

 * Automatically generate a random or MD5 slug when a new post is first saved
 * Configurable slug length (8-32 characters)
 * Optional setting to regenerate slugs on every post update
 * Choose which public post types are supported (Post, Page, and custom post types;
   attachments are excluded)
 * Track managed posts with post meta so existing content is not rewritten by accident
 * Sample slug preview on the settings page
 * Batched bulk processing with an ID cursor for larger sites
 * Cleans up options and managed-post markers on uninstall

#### Links

 * Plugin homepage: https://www.lezaiyun.com/toslug.html

## 屏幕截图

[[

## 安装

 1. Download the plugin zip file.
 2. In WordPress admin, go to Plugins  Add New.
 3. Click Upload Plugin.
 4. Select the zip file and install it.
 5. Activate the plugin.

## 常见问题

### Will changing URL slugs affect SEO?

Yes, it can. Changing an existing post slug changes its public URL. Back up your
database before using “Reset existing slugs” or bulk-processing all posts.

### Which post types are supported?

Post, Page, and other public custom post types can be selected on the settings page.
Attachment is not listed.

### If “Reset existing slugs” is disabled, will old posts be changed?

No. The plugin only generates slugs for new posts, or posts that are still auto-
drafts / have an empty slug. Existing content keeps its slug during normal edits.

## 评价

此插件暂无评价。

## 贡献者及开发者

「ToSlug」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ 老蒋和他的小伙伴 ](https://profiles.wordpress.org/laobuluo/)

[帮助将「ToSlug」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/toslug)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/toslug/)，查看[SVN仓库](https://plugins.svn.wordpress.org/toslug/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/toslug/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/toslug/)。

## 更新日志

#### 1.2.1

 * Load admin JavaScript and CSS via wp_enqueue_script / wp_enqueue_style
 * Remove inline script and style attributes from the settings page

#### 1.2.0

 * Fix: New posts with a title-based slug were not always replaced
 * Refactor: Use wp_insert_post_data instead of a recursive wp_unique_post_slug 
   filter and a second save_post update
 * Add: _toslug_generated meta to distinguish new posts from legacy content
 * Add: Slug preview on the settings page and a confirm dialog for bulk “process
   all”
 * Coding standards: Escaping, wp_safe_redirect, Domain Path, uninstall.php
 * Improve: Bulk processing uses an ID cursor; remove unnecessary rewrite flush 
   and full cache flush
 * Exclude the attachment post type

#### 1.1.1

 * Bump version to 1.1.1
 * Add slug length setting (8-32)
 * Add supported post types setting (Post / Page / CPT)
 * Align automatic generation and bulk processing for multiple post types

#### 1.1.0

 * Bump version to 1.1.0
 * Improve random slug generation with a more reliable entropy source
 * Add unified uniqueness handling via wp_unique_post_slug
 * Fix possible recursive save_post updates
 * Add sanitize callbacks and whitelist validation for settings
 * Improve bulk processing validation and failure reporting
 * Process bulk updates in batches for large sites
 * Standardize text domain to toslug

## 额外信息

 *  版本 **1.2.1**
 *  最后更新：**1 天前**
 *  活跃安装数量 **不到10**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **7.1.3**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/toslug/)
 * 标签
 * [md5](https://cn.wordpress.org/plugins/tags/md5/)[permalink](https://cn.wordpress.org/plugins/tags/permalink/)
   [random](https://cn.wordpress.org/plugins/tags/random/)[slug](https://cn.wordpress.org/plugins/tags/slug/)
   [url](https://cn.wordpress.org/plugins/tags/url/)
 *  [高级视图](https://cn.wordpress.org/plugins/toslug/advanced/)

## 评级

尚未提交反馈。

[您的评价](https://wordpress.org/support/plugin/toslug/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/toslug/reviews/)

## 贡献者

 *   [ 老蒋和他的小伙伴 ](https://profiles.wordpress.org/laobuluo/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/toslug/)