百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

redirection

> 编程语言
开源

管理所有 WordPress 301 重定向并监控 404 错误

627 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

管理所有 WordPress 301 重定向并监控 404 错误

Redirection

Redirection is a WordPress plugin to manage 301 redirections, keep track of 404 errors, and generally tidy up any loose ends your site may have. This is particularly useful if you are migrating pages from an old website, or are changing the directory of your WordPress installation.

Note: this is the current 'trunk' version of Redirection. It may be newer than what is in the WordPress.org plugin repository, and should be considered experimental.

Installation

Redirection can be installed by visiting the WordPress.org plugin page:

https://wordpress.org/plugins/redirection/

Customisation

Redirection provides a large set of WordPress action and filter hooks that can be used to extend or customise the plugin. These can found on the Redirection Hooks page.

Permissions

Access to the Redirection admin interface is given to users who can manage_options. You can modify this with permission filters, described on the Redirection permissions page.

Building

Redirection is mostly a PHP plugin, but does contain files that need to be built. For this you'll need Node and pnpm installed.

Requirements

  • Node.js >= 12.14.0
  • pnpm
  • Composer (for PHP development)

Setup

Install JavaScript dependencies:

bash
pnpm install

Install PHP dependencies (for linting and testing):

bash
composer install

Development

The UI is built with React using @wordpress/scripts. To start development with hot-reload:

bash
pnpm start

To create a production build:

bash
pnpm build

Linting

Run all linters:

bash
pnpm lint

Or run individually:

  • pnpm lint:php - PHP linting (PHPCS and PHPStan)
  • pnpm lint:js - JavaScript linting
  • pnpm lint:css - CSS linting
  • pnpm lint:ts - TypeScript type checking

PHP code can be auto-formatted with:

bash
composer format

Testing

PHP Unit tests:

bash
pnpm test:unit

Or directly via Composer:

bash
composer test-unit

PHP Integration tests (requires WordPress):

First, start the WordPress environment:

bash
pnpm wp-env:start

Then run the integration tests:

bash
pnpm test:integration

To stop the environment:

bash
pnpm wp-env:destroy

JavaScript tests:

bash
pnpm test:js

End-to-end tests:

bash
pnpm test:e2e

Run all tests:

bash
pnpm test

Releasing

Create a release build (builds assets and creates a zip file):

bash
pnpm release

Create just the plugin zip without releasing:

bash
pnpm plugin:zip

Release to WordPress.org SVN:

bash
pnpm release:svn

API Documentation

Generate API documentation:

bash
pnpm doc

Support

Please raise any bug reports or enhancement requests here. Pull requests are always welcome.

You can find a more detailed description of the plugin on the Redirection home page

Translations can be added here:

https://translate.wordpress.org/projects/wp-plugins/redirection

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHP

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言