Why look for any old Webmaster when you can look for a Friendly Webmaster?

The Fix: Duplicate Post Titles Broke My Blog!

April 23rd, 2008 by Marie-Lynn Richard in The Fix, WordPress, WordPress Errors

Thank you so much for your help the other night– it worked! What a great, simple solution! Your help was amazing and very timely! It was so clear and useful, especially because of the screenshots and step-by-step directions you sent me. I am not tech-savvy at all, but was able to easily understand what you wanted me to do, and the fix you recommended worked like a charm!
- Stephanie

So what happened to Stephanie? She recently moved from Typepad to WordPress and noticed that WordPress gets all confused when presented with duplicate post slugs. WordPress will never let you get away with creating duplicates. While you may be able to create posts with the same title, WordPress always appends the slug (this-is-a-permalink-page-slug) with a unique number.

So what do you do when you import duplicate data from somewhere else?

First, try to revert to the classical post structure in Settings > Permalinks (or Options > Permalinks.) Depending on your version or setup, this might be all it takes to distract WordPress long enough to go change your duplicate posts slugs manually.

In 2.3.3 You will find the slug in Manage > Post > Edit Post as one of the expandable options on the right side.

In WordPress 2.5 you will find the post slug right under the title. Be aware that you have to click [Save] under the title and then [Save] again on the right else your changes will not take effect. Click on the picture below for a more visual clue.

Now that may not work at all, espescialy if you can’t edit offending posts. The you’ll have to pull out your database ninja skills and go into your database to do the deed on Mr. Slug yourself.

Don’t worry you can do it. The following instructions come with screen shots with big red arrows because I KNOW some of these buttons seem quite elusive at first glance.

Go into PhpMyAdmin (usually in your CPanel). The first screen you see has a list of tables on the left. Click on wp_posts.

A list of column will appear on the right side. Click Browse to view a list of the posts in your blog.

In the next screen you will have to find the row with the post you have to edit. To make things a little easier for you you can sort the title column so your duplicates will show up next to one another. The click on the pencil.

There you go, you are in the same room with your target, Mr. Slug. The first Arrow point to the title but the second one point to the culprit, the slug.

You can modify the slug to add a number to it but since your slug counts for Google relevancy points, why not just add a juicy word in the slug. It will show up in the URL but not in your title. For example instead of this-was-a-great-day you could make it this-was-a-great-sunny-day.

Here you go and if you have questions you can post them to the WP-Pro mailing list where I try to answer questions as much as I can because it exposes me to new bugs and issues and allows me to grow as a WordPress Pro. All I ask in return is that you tell me if it works and some questions I will feature here for other people to use.

You can also send questions to me directly.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • e-mail
  • Fark
  • Furl
  • Live
  • NewsVine
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis
  • Wists

Post a Comment