Our most recent news and updates

How To Fix Broken Permalinks In WordPress

Are you getting 404 errors when you try to visit pages or posts through their normal links on your WordPress site? This tutorial will show you how to fix broken permalinks in WordPress.

When it comes to a WordPress site, few things are more important than permalinks. They make sure that when a user clicks a link on your page, they actually get to where you want them to go. They make the right content (that WordPress stores in a database) show up nicely depending on what “page” a visitor is on.

Permalinks also keep your links looking nice and clean, rather than some long string of id numbers like:

Note: If you’re looking to fix permalinks on a local development version of WordPress, you might want to check that you have the RewriteModule function enabled in Apache on your local server software.

Things That Can Break Permalinks In WordPress

There are however, a few things that can break permalinks in WordPress. Let’s take a quick look at them.

1. Installing New Plugins

If you install a new plugin that tries to deal with permalinks, you may enocounter an incompatibility that ends up breaking your permalinks.

2. Updates

Whether you update WordPress core, a plugin or your theme, this can actually break your permalinks if you’re unlucky.

It could for example be the result of an incompatibility between the theme or a plugin and the new version of WordPress, or incompatibilities between the new version of the theme or plugin you updated and other plugins.

3. Migrating Site/Restoring Back Up

If you are migrating your site to a new domain or server, or restoring a back up, you can end up breaking your permalinks.

You can do this if you’re using a plugin or service and you face an unexpected bug/error. Or if you do it manually and make a small mistake.

If you a migrating to a new server and you are getting issues, it is quite likely that your issues have to do with the FTP permissions of your .htaccess file. (If this is you, jump to the changing permissions of your .htaccess file section.)

4. File Permissions Or Other Changes To .htaccess File

Your .htaccess file is basically a file that decides who/what gets to do see/use what files on your site. Lately people might focus on how it can be used to defend against bots and other malicious attacks, but it is also what is used to create permalinks in WordPress.

If the file itself has been changed, or even just the file permissions for the .htaccess file, it can completely break your permalinks.

Sometimes file permissions can change without apparent reason. Maybe your host implemented a site-wide sweep, changing permissions on every file of every client in an attempt to improve overall security.

So if you did not update anything or migrate, or restore a backup, you may want to jump straight to the .htaccess section of this tutorial.

How To Fix Broken Permalinks In WordPress

All you need to fix broken permalinks is access to your WP Dashboard, FTP credentials to access your server, and a little bit of patience.

1. Reset Your Permalink Settings

Reset Permalink Settings - How To Fix Broken Permalinks in WordPress

The first thing you want to do if you’re having this issue, is to simply reset your permalink settings.

This is simply to double check that it’s an actual issue, and not just a small stutter that might have occured during updating or migrating.

Simply log into your WP Dashboard, then go to the permalinks settings. Change your settings away from the standard setting, for example to numeric, then save changes. Now simply select your standard setting again, and save the changes.

Now go back to your site, and try to go to any of your posts and pages. Do they show up as they should, or do they show a “Page Not Found” or 404 error?

If they show up as they should, good news.. your problem was likely a stutter caused by a temporary conflict or minor bug.

If you keep getting the error, you should keep following the steps until the problem is solved.

2. Check And Fix Problems With Your .htaccess File

First off, you need to find your FTP credentials. Usually, you can log into your user with your host and then simply see the ftp user inside the dashboard.

If not, you can head into cPanel and get an overview of your ftp users. Go into your cPanel, and click through to FTP Accounts.

FTP Accounts - How To Fix Permalinks in WordPress

Scroll down and you will see your existing accounts.

FTP users - How To Fix Permalinks in WordPress

If you don’t know the password of any of your existing accounts, and you cannot see it in your cPanel, you can simply create a new FTP user.

Then all you need to do is open an FTP Client (like FileZilla) and connect to your website via ftp using your FTP credentials. (Usually

Now head over to the root folder of your WordPress site, and right click your .htaccess file. You should see the option for “file permissions”.

Filezilla File Permissions - How To Fix Permalinks in WordPress

Your file permissions should look something like this:

htaccess permissions - How To Fix Permalinks in WordPress

If they don’t, set them to 644. Now go back to the permalink settings on your site and try to change the settings and save the changes once more.

Check your page again, still getting an error?

Time to check out the insides of your .htaccess file. Download the file, and open it up.

If you have the W3TC plugin installed, your file should look more or less exactly the same as this:

htaccess File Contents - How To Fix Broken Permalinks in WordPress

Even if you don’t, you should at least have the highlighted part in your .htaccess file.

If you don’t, the easiest way to fix this, is to set the file permissions to 666, then reset the permalink settings, and then change your file permissions back to 644.

If you download your .htaccess file again and open it, you should be able to see the highlighted part. If not, you can copy and paste the appropriate code from this codex page.

Try to reset the settings again and visit a post or page. More than likely this will finally fix your website. But if you’re still getting a 404 error, don’t despair.

3. Find And Fix Plugin Conflicts

Another thing that could be causing your permalinks to not work, could be a plugin conflict.

For example a plugin that deals with 403 redirects or some such things.

If you do not have an overwhelming amount of plugins, an easy way to check for and fix this problem, is simply disabling plugins one by one.

First, disable a plugin, then go over to permalink settings and reset the settings again. Now try again to see if your pages show up as they should. No? Disable the next plugin and try again.

One thing to note is that it could be that it is not one plugin that is causing the problem, but more than one plugin with incompatibilities working in tandem finally creating a big problem.

Once you have identified the plugin that seemed to be responsible for stopping you from setting permalinks, you can try to reactivate it. It may not affect your permalinks when they have actually been set, but may need to be deactivated for you to be able to set your permalinks.

Obviously, this is not an ideal way for plugins to interact with your site, but if you are absolutely dependent on this plugin, and there is no good alternative available, it is possible to simply use that as a termporary solution with future updates.


I hope that you found the solution to your permalink/404 page error problem in this tutorial.

If you followed the steps and you’re still facing a problem, please let us know in the comments and we will try our best to assist you with this issue.

WordPress is an amazing piece of software. WordPress allows us to easily create complex websites that would be way way beyond most of our means if all we had was a code editor. The upside is obvious. However the downside of this, is that as WordPress users, might have to deal with complex problems relating to web technologies that we do not understand.

If you routinely run into situations where you feel completely out of your depth, and your website is a crucial part of your business it might be time to get some professional help.

There are now many WordPress support and maintenance services available. You can see an overview and comparison of 8 different services here.

Or if you have the time, interest and dedication, you could always decide to dive deeper into WordPress and the languages/technologies it’s built with.

5 Free Themes + Weekly Newsletter! Interested?


  1. Nitin says:

    I tried all the steps, ive even identified the plugin that causes it but am unable to fix it. ive enabled plain permalink as its working, but as soon as I switch to Post Name Permalink, i start getting 404 errors.

    PLS HELP! 🙁

    1. Dev says:

      Hi Nitin,

      Did you save the permalinks, once you removed the plugin that was causing the issue? If not, let us know, Ragnar should be able to point you in the right direction.

      1. Nitin says:

        just FYI, post name permalink starts working as soon as i deactivate the plugin.

  2. Nitin says:

    I deactivated the plugin..changed the permalinks… and then reactivated the plugin… didnt work … 🙁 should i delete the plugin, then change the permalinks and check ?

  3. Ruarri says:


    I Changed the wordpress permalink in General Settings and now nothing in working.
    I can’t access the dashboard or the login or the settings without getting a page not found error.
    Is there any way to fix this?

    1. alwayspanky says:

      yess, go to the phpmyadmin on server and change the database of option menu

  4. Akshat says:

    Stumbled across this post while searching for fixes for broken permalink. Figured out that it was a plugin that was causing the issue.
    In my case, we had a redirect plugin installed. I changed a couple of permalinks as I was creating new pages – and bam. After a couple of tries, the page stopped working (500 error). Turns out every time I changed the permalink, the plugin created a 301 redirect. Once we figured the problem, there were 8 301 redirects.

    Kinda late, but I hope you were able to fix your problem Nitin. And thanks for the great post Ragnar – really appreciate it!

  5. Praveen says:

    Thanks it fixed my link issues.

  6. Kelcy says:

    Thank you so much. I must have accidentally changed my permalink settings to the wrong one. It took 1 second to fix.

  7. Sethilidsle says:

    Doesn’t work, i still won’t get the page. I can edit the posts / pages and i see the permalink has changed in edit field, but after i update the post / page and then click on it on the blog, it changes the URL like “blog/this-is-my-post”, but it doesn’t exist. WordPress won’t re-create the pages with new names…

  8. Sushant says:

    I’m also getting these errors, final solution was to reinstall wordpress to get rid of it.

  9. Claudio says:

    I’ve changed my permalinks setting from “Post Name” to “Custom Structure” and all links stopped working, only have access to Index.php. I’ve checked the .htaccess and everything looks fine (content and permissions). Of course I’ve tryed restoring the permalinks settings but nothing works. Any clue?

  10. Adam Bailey says:

    I am having this error appear when I updated one of my pages, and for some reason.. now it wont go live to the public? Anyone have any suggestions on how to fix this issue?

    This keeps coming up :

    W3 Total Cache Error: some files appear to be missing or out of place. Please re-install plugin or remove /home2/ichoosep/public_html/carrepairorangecounty/wp-content/advanced-cache.php.W3 Total Cache Error: some files appear to be missing or out of place. Please re-install plugin or remove /home2/ichoosep/public_html/carrepairorangecounty/wp-content/db.php.W3 Total Cache Error: some files appear to be missing or out of place. Please re-install plugin or remove /home2/ichoosep/public_html/carrepairorangecounty/wp-content/object-cache.php.Permalink:

    Any help would be super appreciated 🙂

  11. Dmitry says:

    Thank you for your detailed post about permalinks problem.
    I think i have plugin conflicts, but i don’t know how to find this plugins.

    The permalinks problem has happen time to time just visitors surf my site only. Permalinks break for two plugins: woocommerce and other plugin with custom post type. I have 404 error on thuch pages as:
    When i flushing permalinks by dashboard the 404 error dissapear, but in one day or in week or in month the problem comes back.

    Can you help with this problem?

    Tahnks, Dmitry

  12. Bartosz says:


    I tried all of your tips but it doesn’t seems to work. I didn’t have .htaccess in my site root folder so I made one. My site is in public_html folder.

  13. Serguei Kireev says:

    didn’t help me.. plugin Yoast SEO set some incorrect weird permalink, then i changed it to normal, and no more posts.. nothing helps. disabling plugin doesn’t help. only normal ?p=123 works…

  14. Dharamdip says:

    I usually get this issue when move website from testing to live server. But once I change permalink to default permalink and again roll back to post title permalink all work okay for me.

  15. seki says:

    one issue that is often overlooked is the apache override permission
    without that set you can change .htaccess all you like but it will NEVER get invoked.
    you need to set a directive specifically for the directory your site is being served from eg.
    this entry in httpd.conf or apache2.conf (whichever flavour you are using) ..

    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

    make sure that is set .. restart the service and boom! your .htaccess file will be invoked and your permalink settings will be active 🙂

    1. Richard H. says:

      THIS is the actual answer!!! Seki, you’re a genius!! Thanks

    2. stef b says:

      Thanks a lot Seki – We met this issue with our permalinks settings and searched for hours ( days) what was the problem . You had the solution. Now our permalinks settings are working great again !

    3. Jeannie K says:

      Can you specify the steps to take to do this?

    4. Awesome… perfectly….

    5. Charley says:

      I don’t have a file called httpd.conf or apache2.conf. I’ve been working on a solution for days and getting nowhere. Have deactivated plug ins. Re-saved permalinks after setting to default. Still my pages are showing “page not found” except the home page.

    6. Sara Cooke says:

      That was definitely what helped me, added that line with the appropriate directory and BOOM! Thank you 🙂

      added this at the end for other users

      # nano /etc/apache2/apache2.conf

      Options FollowSymLinks
      AllowOverride all
      Require all granted

      # systemctl restart apache2

      1. Sara says:

        whoops you need to add the directory piece before and after those lines

        at the end

        without the massive amount of spaces between greater than and less than symbols.

        1. Sara says:

          ok that still didnt work… lol guess its blocked by host.

          greater than symbol Directory /var/www/foldername/ less than symbol
          Options FollowSymLinks
          AllowOverride all
          Require all granted
          greater than symbol /Directory less than symbol

    7. Gavin K. says:

      I do agree with the others: THIS is the solution.
      Thanks a lot for your help Seki!

    8. niraj says:

      why this answer not at the top. This is the only thing which worked for me.

    9. Thanks again. It saved my day.

    10. bloxy says:

      thanks, this worked great!!!!! even here in 2021, i forgot to add the directory when i copied the file from another website, i never changed the directory name that the site was stored in

  16. Tony G says:

    Option 1 worked for me. Glad i Googled this first before snapping on my hosting provider. Thanks for this post @Ragnar

  17. Thanks for sharing this helpful post.

    My problem is that my blog posts shows instead of on search result but shows the post name once you click on it. my question now is, how do i make the post name to appear on search result as well?

  18. Trista says:

    Thanks for this!

  19. star says:

    Hi, my blog was working fine but now there is issue with links, non of the post link work. I have changed permalink setting and still no benefit so kindly help

  20. james says:

    Hi, thanks for this.

    How can I redirect to

    Thanks in advance

  21. thank you for sharing post, i need to remove “product” from woocommerce product urls

  22. Krisse says:


  23. Lovy says:

    It worked! Thank you very much. You helped me a lot :)!

  24. Charley says:

    I removed all plugins one by one and re-saved the permalinks. No change. I’ve added the DSS # BEGIN WordPress into my .htaccess file. Still no luck.

  25. Jeroen says:

    In my case it was the fact that mod_rewrite in apache was disabled on the server. So the .htaccess never worked.

    ‘a2enmod rewrite’ and a ‘service apache2 restart’ or ‘systemctl restart apache2’ worked for me!

  26. Jimmy says:

    I need more help on this..A few URL’s are not redirecting.

  27. Hera says:

    Wow, thanks a lot for your help!
    In the end I just had to do the following:

    “Simply log into your WP Dashboard, then go to the permalinks settings. Change your settings away from the standard setting, for example to numeric, then save changes. Now simply select your standard setting again, and save the changes.”

    thats it 🙂
    you saved my day!

  28. bargish says:

    Option 1 worked Thanks for the post @RAGNAR

  29. Countage says:

    This has been helpful. Really happy with this

  30. Pingback: 2auctioneer
  31. Te says:

    Check HTTP or HTTPS links

Leave a Reply

Scroll to top

Free Download

Enter your email address below to get access to this free WordPress theme. We will never spam you!

Error: Please enter a valid email address

Error: Invalid email

Error: Please enter your first name

Error: Please enter your last name

Error: Please enter a username

Error: Please enter a password

Error: Please confirm your password

Error: Password and password confirmation do not match