Sign inBlogSupportContact
General

Add WordPress redirects without the Redirection plugin

You moved a page. You renamed a product category. You need a 301 redirect. One command adds it — persistent across every page load, query strings preserved.

4 min read May 2026 redirect

Moving a page shouldn't mean losing its traffic

You renamed a product. Restructured a category. Changed the slug on your most-linked blog post. Every old URL is now returning a 404 — to Google, to the backlinks you've earned, to anyone who bookmarked the page.

The fix is a 301 redirect: a one-line instruction telling browsers and search engines "this moved there, permanently." Every WordPress site needs this. Most admins install an entire plugin just to write one.

What most people do instead

Install the Redirection pluginPopular, capable, but heavy for a handful of redirects. Its database tables stay behind even after you uninstall.
Edit .htaccess by handRequires FTP or file-manager access. One typo takes down the entire site. Nginx servers have no .htaccess.
Paste wp_redirect into functions.phpTies redirects to the active theme. Switch themes and every redirect disappears silently.

A better way: one command per redirect

Open the TrueCommander navigator. Type redirect -from=/old-url -to=/new-url. Enter. Done.

The command auto-registers itself as a startup command, so the redirect fires on every page load. Re-issue with the same -from to update the destination. Pass -remove=true to delete it.

TrueCommander
Redirect added
Persistent across requests
From: /old-product
To: /shop/new-product301 permanent
Query strings preserved

Case-insensitive path matching. A request to /Old-Product also redirects. Query strings on the incoming request are automatically forwarded to the destination, so ?utm_source=email isn't lost.

How it works

The command hooks template_redirect and compares the current request path to every registered redirect. If a match is found, it issues a wp_redirect() with the configured status code (301 or 302) and forwards any incoming query string.

1
Run the command with from/to pathsExample: redirect -from=/blog/old -to=/blog/new. Defaults to 301.
2
Auto-registered as a startup commandThe redirect fires on every page load. No theme, no .htaccess edits.
3
Re-issue to update, or delete to removeSame -from updates the destination. -remove=true deletes the entry entirely.
ParameterValue
-fromSource path (e.g., /old-page)
-toDestination path or full URL
-status301 (permanent, default) or 302 (temporary)
-removetrue to delete the redirect entry
MatchingCase-insensitive. Query strings preserved on redirect.
Can be used in

Real example

You migrated from an old blog platform and now all your old URLs need to point to their new locations. Instead of editing .htaccess with 47 redirect rules (and praying you don't typo), you build a macro.

The macro loops over a list of old→new URL pairs and runs redirect for each. Ten seconds of execution, 47 redirects registered. Old links on Google, old backlinks from other sites, old emails with stale URLs — all now land on the right page.

Six months later, you retire one of the old URLs entirely. You run redirect -from=/old-post-5 -remove=true. Gone.

Goes further with TrueCommander

Ready?

Retire the Redirection plugin.

This is one of 91 commands. All included with every license.

Cookies. The short version.

Essential cookies keep the cart and theme working. Analytics only fire if you say yes. Read our policy.