WordPress Changing Permalinks Back — Keeps Reverting: How to Fix

You go to Settings → Permalinks. You select a custom structure like /%postname%/ or /%category%/%postname%/. You click "Save Changes." Everything looks good. But then you go back to check, and it has reverted to the default /%post_id%/. Or worse—you try to rename a post slug from "about-2" to "about" and it keeps changing back. Something is blocking your permalink changes from sticking.


The Two Different Problems

There are actually two different scenarios hiding under this issue:

Problem Type A: Permalink Structure Keeps Reverting

What it looks like: You change the structure in Settings → Permalinks, save, refresh, and it's back to /%post_id%/ or ?p=123

Problem Type B: Individual Post/Page Slug Keeps Reverting

What it looks like: You edit a post or page, change the slug from "about-2" to "about", save, refresh, and it's back to "about-2". Or it changes to "about-3".

These have different causes and different fixes. Let's cover both.


Problem Type A: Permalink Structure Reverting

Cause #1: .htaccess Not Writable (Most Common)

WordPress tries to update your .htaccess file when you save a permalink structure. If the .htaccess file doesn't have write permissions, WordPress can't save the changes. It saves the setting to the database, but the rewrite rules don't get written to the file, so they don't actually work. WordPress reverts the display, or shows a warning.

How to check: Go to Settings → Permalinks and look at the bottom of the page. If you see text that says "If your .htaccess file were writable, we could do this automatically, but it isn't…", that's your problem.

Fix #1A: Make .htaccess Writable

  1. Use FTP or cPanel File Manager and navigate to your site root (where wp-config.php is)
  2. Find the .htaccess file (it's usually hidden—enable "Show Hidden Files" in your FTP client)
  3. If .htaccess doesn't exist, create a blank file called .htaccess
  4. Right-click → Properties (or Permissions) → Change permissions to 644
  5. Go back to WordPress → Settings → Permalinks
  6. Select your desired structure (e.g., /%postname%/)
  7. Click Save Changes
  8. Refresh the page—the structure should stay now
  9. Change .htaccess permissions back to 644 (not 777—that's a security risk)

Fix #1B: Manually Add Rewrite Rules to .htaccess

If you can't make .htaccess writable, you can do this manually:

  1. Go to Settings → Permalinks
  2. Choose your desired structure but don't save yet
  3. If you see a message with code to paste, copy that code
  4. Open .htaccess in a text editor via FTP
  5. Replace everything between # BEGIN WordPress and # END WordPress with the code you copied
  6. Save the file
  7. Go back to WordPress and save the permalink structure

Cause #2: mod_rewrite Not Enabled on Server

Even if .htaccess is writable and has the correct rewrite rules, Apache's mod_rewrite module needs to be enabled on your server. Without it, the rewrite rules don't execute.

How to check: Go to Tools → Site Health → Info → scroll down to "Server" section and look for "mod_rewrite". If it says "unavailable", that's your problem.

Fix #2: Enable mod_rewrite

Via cPanel:

  1. Go to cPanel → Apache Handlers (or EasyApache, depending on your host)
  2. Look for mod_rewrite and make sure it's enabled
  3. If it's not, enable it and rebuild Apache (this may take a few minutes)
  4. Go back to WordPress and test permalinks

Via Contact Your Host: If you don't see the option in cPanel, contact your host and ask them to enable mod_rewrite. Most hosts have it enabled by default, but some don't.

Cause #3: WordPress Address (URL) vs Site Address (URL) Mismatch

If these two fields don't match, or if one points to http:// and the other to https://, WordPress can get confused about where permalinks should point.

Fix #3: Match the URLs

  1. Go to Settings → General
  2. Check "WordPress Address (URL)" and "Site Address (URL)"
  3. They should be identical (both http or both https, same domain)
  4. If they don't match, update them
  5. Go to Settings → Permalinks and save again

Cause #4: Rewrite Rules Not Being Flushed

WordPress stores rewrite rules in the wp_options table (in the rewrite_rules option). When you change the permalink structure, WordPress is supposed to delete the old rules and generate new ones. Sometimes it doesn't.

Fix #4: Flush Rewrite Rules

  1. Go to Settings → Permalinks
  2. Click "Save Changes" without changing anything (just refresh the rules)
  3. Go to a post that uses the new permalink structure and test the link

Via WP-CLI (if you have command-line access):

wp rewrite flush

Via Database (phpMyAdmin):

  1. Go to phpMyAdmin
  2. Click on wp_options table
  3. Find the row where option_name = 'rewrite_rules'
  4. Click Edit and set option_value to empty
  5. Click Save
  6. Go back to WordPress → Settings → Permalinks and click Save

Cause #5: Plugin Conflict

A plugin that modifies rewrite rules can interfere with WordPress's default permalink handling.

Fix #5: Disable Plugins

  1. Go to WordPress → Plugins
  2. Deactivate all plugins
  3. Go to Settings → Permalinks and save
  4. Check if the structure stays now
  5. If yes, reactivate plugins one by one to find the culprit

Problem Type B: Individual Post/Page Slug Keeps Reverting

Example: You have a post called "About" with the slug "about". You try to rename it to "about-us", but it keeps reverting to "about-2" instead.

Cause #1: Duplicate Slug in Trash (Most Common)

WordPress won't let two published posts have the same slug. But it allows a published post to use a slug that matches a trashed post. When you try to rename a post to match a slug that exists in trash, WordPress accepts the change temporarily, then reverts it because it sees the conflict.

Classic scenario: WordPress comes with a default "About" page. You delete it (moving it to trash). Later, you create a new post and try to give it the slug "about". WordPress allows it. But then you try to publish the old page again—it becomes "about-2" instead. If you try to manually change it back to "about", it keeps reverting.

Fix #1: Empty the Trash

  1. Go to WordPress → Posts → Trash (or Pages → Trash)
  2. Look for posts with similar names to the one you're trying to rename
  3. Select them and click "Delete Permanently"
  4. Go back to the post you were editing
  5. Try changing the slug again—it should stick now

Cause #2: Rewrite Rules Not Flushed After Slug Change

WordPress stores which slugs point to which posts in its rewrite rules (in wp_options). If the rules don't get refreshed after you change a slug, WordPress doesn't know about the change and reverts it.

Fix #2: Flush Rewrite Rules

  1. Go to WordPress → Settings → Permalinks
  2. Click "Save Changes" (don't change the structure, just refresh it)
  3. Go back to the post and check the slug—it should update

Cause #3: Slug Contains Invalid Characters

WordPress slugs can only contain lowercase letters, numbers, and hyphens. If you try to use capital letters, special characters, or accented letters, WordPress will convert or reject them.

Fix #3: Use Valid Slug Characters

Only use:

  • a–z (lowercase only)
  • 0–9
  • hyphens (-)

Valid slug: about-us

Invalid slug: About-Us or about_us or Über Uns

Cause #4: Plugin Preventing Slug Changes

A security plugin, SEO plugin, or custom plugin might be blocking slug changes.

Fix #4: Disable Plugins One by One

  1. Go to WordPress → Plugins
  2. Deactivate all plugins
  3. Try changing the slug—does it stick now?
  4. If yes, reactivate plugins one by one to find the culprit
  5. Either update the plugin, configure it to allow slug changes, or find an alternative

Cause #5: Multisite Slug Conflict

If you're running WordPress Multisite, slugs can conflict across subsites if not configured correctly.

Fix #5: Check Multisite Configuration

Check if the slug conflicts with a reserved slug in your multisite setup. Contact your multisite admin or host for help with this.


Complete Troubleshooting Checklist

Issue Where to Check Fix
Permalink structure keeps reverting Settings → Permalinks (look for warning message) Make .htaccess writable (Fix #1A)
mod_rewrite not available Tools → Site Health → Server section Enable in cPanel or contact host (Fix #2)
WordPress Address ≠ Site Address Settings → General (top two fields) Make them match (Fix #3)
Rewrite rules stale Settings → Permalinks Click Save without changes (Fix #4)
Plugin conflict with permalinks Plugins → Installed Plugins Deactivate all, test, reactivate one by one (Fix #5)
Post slug keeps reverting Posts → Trash or Pages → Trash Empty trash (Fix B1)
Slug uses invalid characters Edit post/page slug field Use only a–z, 0–9, hyphens (Fix B3)

Prevent Permalinks From Reverting in the Future

1. Keep .htaccess writable during setup: When you first configure your site, temporarily set .htaccess to 644 while you set up permalinks. Once it's saved, you can leave it at 644 permanently (it doesn't need to be writable after the initial setup).

2. Always match your URLs: WordPress Address and Site Address should be identical and use https. Set them once and don't change them later.

3. Empty trash regularly: Don't leave deleted posts and pages in trash for months. After you delete something, decide if you really need it. If not, empty it permanently.

4. Test new permalinks before publishing: Change your post slug, save the draft, and visit the post page to confirm the URL is correct before publishing.

5. Keep plugins updated: Outdated plugins are common sources of rewrite rule conflicts.


The Real Talk

Permalink issues are frustrating because they seem random. You change something, it looks like it saves, but then it silently reverts. In reality, it's almost always one of two things: either WordPress can't write the rewrite rules to disk (.htaccess problem), or it's detecting a conflict (duplicate slug in trash). The other causes—mod_rewrite disabled, URL mismatch, stale rules—are less common but easier to fix once you know what to look for.

The key insight: WordPress saves settings to the database and to .htaccess separately. If the database says "use pretty URLs" but .htaccess is blank or unreadable, the pretty URLs don't work. That's why most permalink problems trace back to file permissions and .htaccess.

Last updated: October 2026. Real data: WordPress.org support forums (2005–2026), WordPress Core trac tickets, WordPress documentation, cPanel resources.