Themewaves
How-To

How to Change a URL in WordPress Safely

Learn how to change a URL in WordPress, edit slugs, set redirects, update links, and avoid common SEO problems with clear steps and tips.

Editorial Team 8 min read
How to Change a URL in WordPress Safely

Understanding WordPress URLs

Geometric path with crimson panel representing clear WordPress URL structure
See the parts of a WordPress URL

To change a URL in WordPress, edit the page or post slug in the WordPress dashboard. Then test the new address and check the old one. A slug is the last part of a URL after the domain.

For example, https://example.com/wordpress-tips/ has two main parts. The base domain is example.com. The slug is wordpress-tips. WordPress builds the full URL from your domain, permalink rules, and slug.

A good slug tells readers what they will find. It can also help search engines read the page topic. Keep it short, clear, and tied to the page content.

  • Use lowercase letters where possible
  • Separate words with hyphens
  • Remove filler words when the meaning stays clear
  • Avoid spaces, symbols, and unclear numbers

Some characters cannot work well in URLs. These include spaces, brackets, and many symbols. WordPress may strip them or replace them with encoded text.

Why Change a WordPress URL?

A weak slug can confuse visitors and hide the page topic. A clear slug gives people a useful hint before they open the page. It also makes shared links easier to trust.

You may need to change a URL after a site rebrand. You may also change one after a title update or content refresh. A shorter slug can remove old dates, vague terms, or needless folder names.

For example, change /post-123/ to /wordpress-url-guide/. The second version gives a clear topic signal. It also works better when readers share the link.

Do not change URLs just to chase a small keyword gain. Each change creates work for redirects, links, and site maps. Change a slug when it fixes a real clarity or site structure issue.

How to Change a Page or Post URL

Minimal notebook and red cover symbolizing steps for changing a WordPress page URL
Follow the URL change steps

The dashboard is the safest method for most site owners. First, open the page or post you want to edit. Make sure you have the right page before changing its address.

  1. Open Pages or Posts in WordPress.
  2. Select the item that needs a new URL.
  3. Find the Permalink or URL field.
  4. Replace the old slug with a short, useful phrase.
  5. Save the draft or click Update.
  6. Open the new URL in a private browser window.

The exact field location depends on your editor and WordPress theme. In the block editor, click the page title or the settings panel. Look for the link or permalink control.

When you save a new slug, WordPress often keeps the old address working. Its old slug handling can send visitors to the new URL. Still, test the old link because site settings can affect this behavior.

For important pages, create a clear 301 redirect as well. A 301 redirect tells browsers and search engines that the move is lasting. Google's guide to permanent redirects explains this signal.

A slug changes one page or post. A permalink structure changes many URLs across your site. Treat this setting as a major site move.

Open Settings, then Permalinks, inside the dashboard. Common choices include the post name, day and name, and month and name. The post name option creates simple URLs such as /about-wordpress/.

Choose a structure that fits your site for years. News sites may need dates. Business sites often need shorter paths. Avoid changing this setting on a busy site without a redirect plan.

StructureExampleBest fit
Post name/url-guide/Evergreen guides
Day and name/2026/08/26/url-guide/Daily news sites
Category and name/wordpress/url-guide/Large topic groups

Click Save Changes after choosing a structure. WordPress may refresh its rewrite rules at this point. Check several old and new links after the change.

Redirecting Old URLs to New Ones

Crimson bridge between graphite blocks representing redirects from old URLs to new ones
Connect old and new URLs

A redirect guides visitors from an old URL to its new home. It also helps search engines transfer signals from the old page. Use a 301 redirect for a lasting move.

You can add redirects with a trusted redirect plugin. Many SEO plugins also include a redirect tool. Add the old path and the full new path, then test both addresses.

Server rules offer another method. Apache sites may use the .htaccess file. Nginx sites use server settings instead. Ask your host for help if you do not manage server files.

WordPress also supports deeper tools for advanced users. You can update the site URL through wp-config.php. You can change records in the database. WP-CLI commands can help with large site moves.

These methods need care. A wrong database value can break the dashboard. A bad server rule can create redirect loops. Back up the site before using either method.

  • Redirect the old URL to the closest new page
  • Avoid sending every old page to the home page
  • Use one direct redirect instead of several hops
  • Check for loops and missing target pages

Best Practices for Safe URL Changes

Plan the new slug before you publish it. Check whether another page already uses that slug. WordPress will append a number when the slug already exists.

For example, a second page called /pricing/ may become /pricing-2/. Search your pages, posts, and media before saving the change. Pick a unique slug that matches the right content.

Update internal links after changing a URL. Check menus, related posts, buttons, and image links. A site crawl can find links that manual checks miss.

Update your XML sitemap too. Many SEO plugins refresh it after a page update. Visit the sitemap and confirm that the new URL appears.

Keep the old page live through a redirect. Do not delete it first. Watch search data and server logs for missed links during the next few weeks.

  • Keep slugs short and easy to read
  • Use two to five useful words when possible
  • Match the slug to the page topic
  • Avoid dates unless the page truly needs them
  • Use hyphens instead of underscores
  • Review redirects after launch

The WordPress permalink settings guide covers the core options and their effect.

Common URL Problems and Fixes

Graphite and crimson geometric pieces showing a solved WordPress URL problem
Fix common WordPress URL issues

A 404 error means the server cannot find the requested page. Check the new slug first. Then open Settings, choose Permalinks, and click Save Changes once.

This action refreshes WordPress rewrite rules. It often fixes links that stopped working after a URL change. Clear your cache before testing again.

A redirect loop sends the browser back and forth. Check for two rules that target each other. Remove duplicate rules and keep one clear path to the new URL.

If the old URL still loads the wrong page, check for a slug clash. Another post may own that path. Search the dashboard and review your redirect list.

If search results show the old URL, give search engines time to recrawl. Check that the old URL returns a 301 status. Submit the new page for crawling through your search tool.

Some URL changes also affect canonical tags. Confirm that the new page names itself as the main version. Remove duplicate copies when they no longer serve a purpose.

Using Advanced WordPress URL Methods

Most site owners should use the dashboard or a redirect plugin. Advanced methods suit developers and managed site teams. They help when you must change many URLs at once.

The wp-config.php file can force the WordPress address and site address. This can restore access after a mistaken domain setting. Edit it only after making a full backup.

Database updates can fix many records in one task. They can also damage serialized data when handled by hand. Use a tool that understands WordPress data before running replacements.

WP-CLI can search and replace URLs from the command line. It works well for staging moves and domain changes. Run a dry check first, then review the result before saving.

After any bulk change, test key templates and feeds. Check the home page, posts, pages, images, and admin login. Small tests can catch a large site mistake early.

A Simple Final Check

Changing a WordPress URL is simple when you control the full move. Edit the slug, save the page, and test the new address. Then protect the old address with a lasting redirect.

Next, update internal links and your sitemap. Check for duplicate slugs and broken paths. Review search data after the change.

A clear URL helps people understand your content. A careful redirect plan helps preserve its value. Keep both steps in your publishing routine.

Step-by-step

  1. 01
    Open the page or post

    Go to Pages or Posts in the WordPress dashboard. Select the item that needs a new address.

  2. 02
    Edit the slug

    Find the Permalink or URL field. Replace the old slug with a short phrase that matches the content.

  3. 03
    Save and test the change

    Click Update or publish the draft. Open the new URL and test the old URL too.

  4. 04
    Add a 301 redirect

    Create a redirect from the old path to the new path. Use a plugin or server rule.

  5. 05
    Update links and the sitemap

    Fix internal links, menus, and buttons. Confirm that your XML sitemap lists the new URL.

Frequently asked questions

How do I change a URL in WordPress?
Open the page or post in the dashboard. Edit its permalink or slug, save the change, and test the new URL.
How do I change the URL of a page in WordPress without losing SEO?
Change the slug, then redirect the old URL with a 301 redirect. Update internal links and your sitemap as well.
Does WordPress automatically redirect an old slug?
WordPress often sends old post slugs to the new URL. Still, test the old link and add a clear 301 redirect for key pages.
What happens when a WordPress slug already exists?
WordPress adds a number to the new slug, such as “pricing-2.” Search your content first and choose a unique slug.
Can I change the WordPress site URL in wp-config.php?
Yes, but this is an advanced fix for site address settings. Back up your site first, because a wrong value can block access.
Should I update my sitemap after changing a URL?
Yes. Confirm that the new URL appears in your XML sitemap. Remove or redirect the old URL when needed.
change WordPress URLWordPress page slugedit post permalink301 redirect setupWordPress permalink structureupdate internal linksXML sitemap changesfix broken WordPress links

Related reading