How to Fix Messed Up Permalinks When a Blog Already Has Content

I’ve run into this problem a couple of times and finally figured out the easy way to fix it.  Someone probably figured this out a long time ago and if I had looked hard enough I probably would have found the answer, but oh well.  At least now I know!

Ok, so here’s an illustration of the problem.  You’ve just started a new blog and even written a few posts.  Then one day you realize that you have ugly URL’s.  For example your URL’s are something like www.blog.com/?p=5.  And the you realize, “OH CRAP!  I forgot to set up pretty permalinks!”

So naturally the next step is you go into your permalinks options and change it to something like /%category%/%postname%/.  Then you breathe a sigh of relief, until you go to your blog and all of your pages cannot be displayed!!!  OH NO!

Ok, so I’m being a little dramatic with this, but it’s happened to me a couple of times and who knows, it may have happened to you as well.  So here’s the quick fix that I used today and it worked:

  1. Revert to the default permalink structure.
  2. Log into your hosting account.
  3. In the root folder of your blog, find the .htaccess file and delete it.
  4. Now, set up the permalink structure the way you want it and save it.

That should fix it!  At least it did for a blog I was helping someone with today!  If you have any other tips on this, feel free to share, but hopefully that saves you some headaches.

Save for Later: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Technorati
  • Furl
  • Reddit
  • StumbleUpon

Related Posts

What is RSS?
You Can’t Learn to Ride a Bicycle at a Seminar
Should Your Business Have a Blog Attached to the Site?
5 Ways to Get Ideas for Articles, Posts, and More!
Onsite vs. Offsite SEO



94 Comments

Japanese BushidoNovember 14th, 2008 at 5:15 am

I have dealt with the problem myself, but there is also one other thing to keep in mind, if you are under a linux server, you have to be under 777 access mode in order to write the a new .htaccess file.

[Reply]

Dan Reply:

That is true. The cool thing about this fix is that by deleting the file WordPress automatically tries to recreate the file once you change the permalink structure. But yeah, if your chmod isn’t set up right it won’t work anyway!

[Reply]

ZobelNovember 14th, 2008 at 11:50 am

i needed this information…..THANK YOUUUUUUUU!

[Reply]

Dan Reply:

You’re welcome :)

[Reply]

Scarpe Da GinnasticaNovember 15th, 2008 at 3:00 am

Just to avoid ending in a mess and not being capable of fix it, the first thing i do when i start a blog is to triple check if i have set up permalinks properly. :-)

[Reply]

Dan Reply:

I have a tendency to forget that step for some reason. I’m glad that you’re not like me in that regard!

[Reply]

Rika Susan's Outdoor Lighting NewsNovember 15th, 2008 at 4:47 am

Thanks for this tip, Dan! I need to try this on one of my blogs, but I have always been too scared that I would mess things up. You have some really practical posts here with doable info. Keep it up! Also following you on Twitter.

[Reply]

Dan Reply:

Glad to help. I’ve just run into this problem too many times and I think I finally found a good fix for it. The one thing to be careful of is that if your blog has been around for awhile you may not want to make the switch at all because of any links you have out there.

[Reply]

Used computersNovember 16th, 2008 at 3:00 pm

Sometimes deleting .htaccess is not possible, depending on server and what other redirections you have setup on it. So maybe manually redirection in .htaccess file could solve your problem. Usually Wordpress gives you the redirection syntax; if not (or if your blog is not made in Wordpress), you could find on net how to make 301 permanent redirection.

[Reply]

Dan Reply:

Yes, they do give some instructions in the WordPress codex on how to change the .htaccess file. This fix is mainly for a relatively new blog and not one that has been established for awhile.

[Reply]

RockstarNovember 17th, 2008 at 4:26 am

I this Giving WRITE Permission to htacess file s enough ….. What you say ??

[Reply]

Dan Reply:

There are modification to the htaccess file that you can make, but this fix works because WordPress recreates the htaccess file once you delete it and then try to change permalinks.

[Reply]

Andy | West Florida ComponentsNovember 18th, 2008 at 9:32 am

Thanks for the specific directions. I wish I had them before I started blogging. Actually, in the beginning, I found different instructions that made my posts disappear so I reverted to the default.

[Reply]

Dan Reply:

Yeah, it’s never a comforting feeling when your posts disappear :) . I still feel though that if your blog has been running for awhile you should probably just leave it alone so you don’t mess up any links that you have out there. Unless you set up 301’s for all of those pages, but that wouldn’t be much fun at all ;)

[Reply]

Em @ Think HorsesNovember 19th, 2008 at 6:50 am

You just saved me hours of work. We just bought an old domain and it was kind of messed up so this tip is so relevant.

[Reply]

Dan Reply:

I’m glad it helped!

[Reply]

online utilityNovember 19th, 2008 at 10:06 am

That’s a nice solution but how to redirect your traffic to the new links? Also, aren’t you going to lose your pagerank for your pages once a Google pagerank update occur? i dont know but this solution seems to rise a lot of doubts to me!

[Reply]

Dan Reply:

that’s why this solution is really for a new blog. If your blog has been up for a long time you’d have to do some 301 redirects to maintain the PR and links.

[Reply]

Webdesign web design Reply:

Unless your weblog is very large. It’s better to just start over with correct/new links.
I’ve had this problem once.

[Reply]

Suet FeedersNovember 25th, 2008 at 8:29 pm

I’ve seen a Wordpress plug in that handles the 301 redirect automatically after the permalink change, but I can’t find the note on it. but I’m sure one exists, and it handles the heavy lifting of changing the permalink as well.

[Reply]

Dan Reply:

That would be a great plugin, let me know if you ever remember the name of it or find a link to it. Thanks!

[Reply]

forex day trading manNovember 29th, 2008 at 4:08 pm

Wow, that was exactly the kind of information I was looking for. I have made this mistake many many times, and never knew how to fix it. But what about links to internal pages? Those links wont work anymore?

[Reply]

Dan Reply:

You know I’m not sure if they would or not. WordPress might be smart enough to translate it over, but my first guess would be that it wouldn’t.

[Reply]

Khaled Quadrant vansDecember 2nd, 2008 at 6:19 am

I had a similar problem on a blog and used deans permalinks migration which is a plugin for Wordpress. I tried a few times unsuccessfully to get it to work, then found out you have to get the hosting company to enable mod rewrite on your hosting, worked nicely then.

[Reply]

Dan Reply:

Do you by chance have a link for the plugin? That sounds like a really cool one to have!

[Reply]

Khaled Quadrant vans Reply:

http://www. deanlee.cn/wordpress/permalinks-migration-plugin/ to download the plugin and
http:// uk.youtube.com/watch?v=EFH26FmJURI for an ideots guide how to use the plugin (for people like me) You need to make sure that your mod-rewrite is enabled in apache (speak to hosting if it doesn’t work) Hope it helps

[Reply]

african antelopeDecember 8th, 2008 at 10:49 pm

Well yes, it is always possible to fix it at anytime, but is it really advisable to change your permalink structure, after 2 years of having a blog, etc? That’s my biggest fear.

-Jean

[Reply]

Dan Reply:

If you use the plugin Khaled mentioned above, you’ll probably be ok because I’m pretty sure it does a 301 redirect for the old links.

[Reply]

Leon Belenky-Compare Web Hosts ExpertDecember 11th, 2008 at 10:28 pm

Such helpful information, though I would think it would be best to have your web host do the change for you.

[Reply]

Dan Reply:

Yeah, I’ve found that in some situations you really do have to have the host make a few changes. And here I thought I had found a super simple fix :)

[Reply]

J.R. FarrDecember 12th, 2008 at 8:08 am

Hey Dan,

Nice post man. Very informative for anyone with a new blog. I noticed in the comments everyone is mentioning the 301 re-directs. I was going to mention this as well but you mentioned this was more the relatively newer blogs.

If anyone out there has an older blog there is a Wordpress plugin that is makes your life so easy if you want to have a 301 redirects automatically.

It seriously is ridiculous how easy this plugin makes it. Go check it out if you need 301 redirects setup.

http://www.deanlee.cn/wordpress/permalinks-migration-plugin/

Again, nice post man!

[Reply]

Dan Reply:

Thanks for the tip and info about the plugin. This can be a great resource for the older blogs that need to make some changes.

[Reply]

LillaDecember 19th, 2008 at 9:48 am

I see permalinks on many of the blogs. Technically what does it actually mean?

[Reply]

Dan Reply:

A permalink is just a link to an individual post. This way each post has it’s own url that can be linked to directly.

[Reply]

Grand Rapids Website DesignsDecember 24th, 2008 at 10:10 pm

Another great post, this information is great for those who are forgetful when starting a new blog.

[Reply]

The Guru AssassinJanuary 20th, 2009 at 10:49 am

I recommend you the Platinum Seo plugin for Wordpress. You can set it to solve permalinks error redirections automatically.

[Reply]

Arnas Reply:

I agree, I’m using Platinum SEO (http://wordpress.org/extend/plugins/platinum-seo-pack/) and among other cool features it handles permalink redirects automatically.

[Reply]

Restructuring 2.0January 20th, 2009 at 12:27 pm

Thanks for the tips!!!

[Reply]

ZibazJanuary 21st, 2009 at 12:59 am

WOW!!! This is so easy!!! And i was trying to find solution to this problem for ages… Thanks

[Reply]

cheap diaper bagsJanuary 24th, 2009 at 9:42 pm

Geez, I am so glad that I found this post. I was trying to find a easy way to do this. Thanks!

[Reply]

cheap sunglassesJanuary 30th, 2009 at 2:26 am

That tips are great it seems very easy now…thanks for that post…

[Reply]

CuocThiSEO - VietSEOGuyFebruary 2nd, 2009 at 1:05 am

Simple but good tip! Thanks for sharing! :-)

[Reply]

beckyFebruary 15th, 2009 at 10:48 pm

everything is fine but what abvout these 2 how /%category%, /%postname%.do i have to make any change or anytjinh in its attributes.thanx

[Reply]

Web Design CompanyFebruary 17th, 2009 at 3:35 pm

Any issue related to links require utmost care and attention. Permalinks are what your website is indexed by. Any errors are likely to have a long term impact on your overall ranking of your website on search engines.

[Reply]

Zen Cart TemplatesFebruary 19th, 2009 at 7:46 am

It is very common problem and your information helps me a lot, thnx)

[Reply]

Seth RIdleyFebruary 25th, 2009 at 11:57 am

Thanks, that is very useful. We’ve been caught out by not setting up permalinks in WP at the start of the development process . Also it seems that clients tend to know about permalinks now so it’s exactly the sort of issues you’ll get asked about just before a site is due to go live!

[Reply]

Leon Blenky-Web HostingMarch 2nd, 2009 at 11:24 pm

Thanks for sharing this great info; having permalinks set up correctly can make or break a site looking professional

[Reply]

Zen Cart TemplatesMarch 5th, 2009 at 8:56 am

permalinks are important aprt of your success and you article gives great tips for this problem

[Reply]

nokia n95 accessoriesMarch 12th, 2009 at 12:47 am

wow this is really great post…thanx for sharing such a great information…it has add some more knowledge for me….having permalinks set up correctly can make or break a site looking professional

[Reply]

IvalApril 5th, 2009 at 11:57 pm

I have messed up my permalinks structure once and traffic goes down the drain fast. huhuhu

[Reply]

Leon Blenky-Compare Web HostsApril 28th, 2009 at 11:07 am

This is such a great tip; it is so easy to accidentally mess up a permalink, so knowing how to quickly correct it without messing up anything else is GREAT for everyone to know.

[Reply]

JuneMay 3rd, 2009 at 8:03 am

This is a great tip! The one thing that I am not understanding though, is if you delete the .htaccess file, don’t you have to create another one? Being a complete non-techie - how would you create a new one? Also what is the difference between All-in-one-seo-pack plug-in and the platinum-seo-pack? Does anyone know? If I were to install the platinum, would I have to deactivate and uninstall the all-in-one? Really appreciate this post and any responses to my questions!

[Reply]

top foodsMay 27th, 2009 at 11:15 am

ntegrating blog content to my website without putting a whole page with the banners and other links and stuff. I just want the content in it. help!

[Reply]

yazılımJune 1st, 2009 at 2:09 am

Was searching for this one. Thanks

[Reply]

leeds solicitorsJune 4th, 2009 at 6:49 am

Great post, thanks for sharing

[Reply]

LauJune 12th, 2009 at 3:06 pm

Thank you for dircetions - useful tip

[Reply]

Franchise Business OpportunitiesJune 22nd, 2009 at 10:27 am

Great advice, I was having real difficulty with this.

[Reply]

web design leedsJune 23rd, 2009 at 5:07 am

very good advice, something i always have problems with

[Reply]

remotepc supportJuly 2nd, 2009 at 11:30 pm

Yeah, I too a beginners for blog had a several instruct but this advice keep cool!!!

[Reply]

AlexanderJuly 12th, 2009 at 8:10 pm

Thanks for the advice you gave…
That is very helpful if we encounter problems like this
in our blogging stuffs

[Reply]

DevNetJuly 29th, 2009 at 1:12 am

But it depends if you already have other information like mod rewrite on hat .htaccess file.

Thanks for the tip.

[Reply]

luxury yacht charterAugust 16th, 2009 at 4:12 am

It’s just the small step but bring big effect. .htaccess file is the only annoying file if we want to fix our broken permalink (that’s just my own idea). Thanks for informing,. Good idea shared here. CHEERS!

[Reply]

WikiawAugust 24th, 2009 at 9:13 pm

I love useful posts this is definitely one of them

[Reply]

MattSeptember 5th, 2009 at 11:21 pm

Thanks for the great arricle!
I have had a lot of trouble with permalinks and this helped!
-Matt
PS: Check http://www.divknowledge.com for design news.
=)
-M

[Reply]

Fort Lauderdale LocksmithSeptember 6th, 2009 at 12:23 pm

Excellent information - thank you. Most people don’t know how important things that you highlighted are. Thanks for helping spread the good word!

Regards,

Fort Lauderdale Locksmith

[Reply]

Wordpress Web DesignerSeptember 17th, 2009 at 10:06 pm

Thanks for the post. There are actually new plugins that help with permalink issues. Unfortunately, they sometimes cause other headaches. Still, I suggest trying them out. Look for them in the Wordpress Codex.

[Reply]

Online ShoppingSeptember 28th, 2009 at 3:36 am

The one thing to be careful of is that if your blog has been around for awhile you may not want to make the switch at all because of any links you have out there.They do give some instructions in the WordPress codex on how to change the .htaccess file. This fix is mainly for a relatively new blog and not one that has been established for awhile.

[Reply]

sam security alarms coronaOctober 1st, 2009 at 6:23 am

Someone need to fix it. You got that..very nice research and thanks for the solution.

[Reply]

Turning WindsOctober 7th, 2009 at 5:46 am

This article is a life saver. I have a wordpress blog and I changed the parmalink format. And Oh no! all the pages are no longer there. So I followed your steps and it now works!

[Reply]

SnowcoreOctober 13th, 2009 at 2:26 am

I agree with Turning Winds :)
But I prefer to use my custom blog engine to wordpress

[Reply]

how much is motorcycle insuranceOctober 20th, 2009 at 12:50 pm

Thanks! Got an answer from here. I will bookmark this page for reference.

[Reply]

QueenslandOctober 28th, 2009 at 12:33 pm

Sounds really simple so I am going to give it a try.

[Reply]

Discount FlowersNovember 10th, 2009 at 7:33 pm

Thanks, I’ve had this problem before and didn’t know how to fix it! I find Wordpress a little difficult to use sometimes, and this is really helpful.

[Reply]

VikiNovember 17th, 2009 at 5:31 am

I completely agree with your opinion, thanks.

[Reply]

Oyuncak toptanNovember 27th, 2009 at 2:13 am

I recommend you the Platinum Seo plugin for Wordpress. You can set it to solve permalinks error redirections automatically.

[Reply]

velocrimeaDecember 3rd, 2009 at 1:15 pm

Thanks man, just what I was looking for. Worked like a charm Thanks so much

[Reply]

durable power of attorneyDecember 11th, 2009 at 1:59 am

Also it seems that clients tend to know about permalinks now so it’s exactly the sort of issues you’ll get asked about just before a site is due to go live! thanks…

[Reply]

energieberaterDecember 27th, 2009 at 3:09 am

Another great post, this information is great for those who are forgetful when starting a new blog.

[Reply]

Moped wikiJanuary 2nd, 2010 at 2:56 am

Thank you, you saved me my headaches with this useful post.

[Reply]

Tu Primera CitaJanuary 3rd, 2010 at 8:58 am

THANK YOUUUUUUUU!

[Reply]

Web Hosting SitesJanuary 8th, 2010 at 6:34 pm

Great tip. I got trouble with permalinks and I tried a few times but had to give up.

Thanks for your tips.

[Reply]

GameflyJanuary 11th, 2010 at 2:15 am

Thank you for sharing this.I have also set permalink in my blog.
Gamefly

[Reply]

Chris WebbJanuary 12th, 2010 at 4:38 am

thanks for sharing this really useful article; how many people have had this problem! i know i have..

[Reply]

Cookie Creative - Graphic Design ManchesterJanuary 17th, 2010 at 9:27 am

Thanks! You saved me my headaches with this useful post.. I will bookmark this page for reference.

[Reply]

brandonFebruary 10th, 2010 at 8:38 pm

Sometimes deleting .htaccess is not possible, depending on server and what other redirections you have setup on it. So maybe manually redirection in .htaccess file could solve your problem. Usually Wordpress gives you the redirection syntax; if not (or if your blog is not made in Wordpress), you could find on net how to make 301 permanent redirection.

[Reply]

viandaFebruary 10th, 2010 at 8:39 pm

I completely agree with your opinion, thanks.

[Reply]

JohnFebruary 15th, 2010 at 7:46 pm

A great tip to figure out messed up permalinks.It is not actually adifficult task.Isn’t it?

[Reply]

kanishkFebruary 16th, 2010 at 8:39 pm

I’ve had this problem before and didn’t know how to fix it! I find Wordpress a little difficult to use sometimes, and this is really helpful.
thanks
Infant Baby Bedding

[Reply]

MariaMarch 2nd, 2010 at 4:05 am

To live is to resist

[Reply]

CarloMarch 2nd, 2010 at 4:06 am

Yes to live is to resist

[Reply]

Home Based Business OnlineMarch 2nd, 2010 at 7:52 am

Very useful post! I’ve also had some problems when I wanted to change my permalinks structure. After changing them I lost all the backlinks pointing to my blog. :(

[Reply]

Movies online freeMarch 6th, 2010 at 8:46 am

I’ve changed permalinks without having a problem finding my posts afterwards. Maybe Wordpress has been updated to handle them better since then. The only problem I found when changing them is Google. “1,200 pages cannot be found” < that was a problem which hurt my rankings a lot.

[Reply]

Firewood DealerlMarch 11th, 2010 at 1:17 am

i think it was written with a great effort

[Reply]

YoYurecMarch 11th, 2010 at 7:03 am

Maybe just “find the .htaccess file and delete it” be enough?

[Reply]

Leave a comment

Your comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

NOTE: I reserve the right to edit your comment if I feel it necessary.