All 18 Redirects sections
From the command line
Every screen has a command, which matters for two things a browser is bad at.
A migration. A site arriving from an old platform has twenty thousand redirects in a spreadsheet, and a browser upload means a size limit, a time limit and a request that can die half way with no way to tell what got in:
wp trrd import old-site-redirects.csvOne file is read up to 20,000 rows. A longer one imports its first 20,000 and says how many rows after that were not read, so put the rest in a second file and import that too.
The same command reads the redirects another plugin kept on this site, or a server file, exactly as Settings does (see Coming from another redirect plugin). --dry-run says what would come across and what would stay behind, and changes nothing. It is for --from and --htaccess only: a .csv import has no dry run, and with --dry-run it is refused rather than run:
wp trrd import --from=rank-math --dry-run
wp trrd import --from=redirection
wp trrd import --htaccess=rank-math-redirections.htaccessMany sites. Somebody looking after thirty of them can ask all thirty what is breaking without opening thirty tabs:
wp trrd list --origin=broken --format=csv
wp trrd broken
wp trrd check --allThe rest:
| Command | What it does |
|---|---|
wp trrd list | The redirects, with --search, --origin, --limit, --format. --origin takes manual, renamed, permalinks, imported, from_log or broken, and refuses any other word |
wp trrd add <old> [<new>] | Add one, and say which status it answers with. --status takes 301, 302, 307 or 410 (for a page that is gone) and refuses anything else |
wp trrd delete <old> | Remove one. The address is read the way add stores it, so /blog finds /blog/, and on a site matching query strings the query picks the rule |
wp trrd test <address> | What this site would do with that address |
wp trrd check [--all] | Check the destinations still answer |
wp trrd import <file> | Read a CSV |
wp trrd import --from=<plugin> | Bring over the redirects another plugin kept here: redirection, rank-math, yoast or srm. Add --dry-run to only look |
wp trrd import --htaccess=<file> | Read the redirects in an .htaccess or Nginx file, and list the lines it could not read: the first 200, and how many more |
wp trrd export [<file>] | Write one, or print it |
wp trrd broken | What is breaking, with the suggested page for each |
wp trrd ignore <address> | Never list an address on Broken links again, as the button does. End it with for a section. / and / are refused |
wp trrd unignore <address> | Take an address off that list, so it is listed again when somebody asks for it |
Every command goes through the same doors the screens use, so nothing there can write a rule the form would have refused an administrator either. A command may redirect to another site whoever runs it (see Redirecting to another site).
Still stuck? Ask the developers who wrote it. We aim to reply within one business day.