Solved

WordPress 3 - Permalinks

Posted on 2011-02-21
12
198 Views
Last Modified: 2012-05-11
Hi,
I want my post URLs to be formatted this way:
http://example.com/category/post-name/

and I can do this from:
wp-admin/options-permalink.php by specifying:
/%category%/%postname%

Then why it is not recommended? Please read the following link:
http://ottopress.com/2010/category-in-permalinks-considered-harmful/

Regards
0
Comment
Question by:rajoo_sharma
  • 4
  • 4
  • 2
  • +2
12 Comments
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 400 total points
ID: 34943314
Just don’t start the permalink with %postname%, %category%, %tag%, or %author%. That’s it. That’s the only rule.  So maybe you could do it like this:

http://example.com/permalink/category/post-name/
0
 
LVL 16

Expert Comment

by:JF0
ID: 34943346
The author does not recommend it for performance sake (he explains why), but I think you will be just find doing it however you like. I use just %postname% on my sites and they do just fine.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 34944579
There is a performance hit (as everyone has mentioned) but if you are not hosting a site that expects huge traffic, you can probably get away with it (as JF0 says).  The one caveat is that you can never really know if your site will go viral overnight for whatever reason, so are gambling a little bit with your future traffic.
0
 

Author Comment

by:rajoo_sharma
ID: 34944607
Thanks for the reply.

@JF0, when its not recommended for the performance sake then what is the alternative?


@jason,
The website I'm working on is a CMS and not a blogging website. I chose WordPress as a CMS for its simple admin interface and its  easier to explain Content Management to someone who is going to manage the website on his own.

What will happen when the content will grow and site will get good traffic after the SEO stuff?

Do you suggest some alternative to generate nice URLs optimized?

Thanks
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 100 total points
ID: 34944648
If you look at Ray's post, he gives you the solution.  Just put some static text in the permalink:

/content/%category%/%postname%

to generate:

http://www.yoursite.com/content/categoryname/postname

The /content/ avoids the issue mentioned in the linked article.
0
 

Author Comment

by:rajoo_sharma
ID: 34944761
Thanks,
@Ray, @Jason, so prefixing something like content will fix the performance problem?

I need nice URLs for SEO purposes and my content will be categorized too (although not related to this issue / post at all, I'm using custom posts over pages to handle another performance issue since I'll have many pages).

I've been using Drupal for so many years and comfortable with it. Like any other good CMS, this too implements Nice URLs and there is no performance issue.

The zen-cart too (CEON URI module) has no problem (performance wise) for URL rewrite.

So is there any workaround? or a proper plug-in kind of solution that gives nice URLs without performance issue?

Thanks
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 34944787
Again, just add the static text and that fixes the issue...
0
 
LVL 31

Expert Comment

by:gwkg
ID: 34948312
I use the year of the post

%year%

you can also use post_id

%post_id%

But like he explains, it's only a problem if your site has a lot of pages (30+)

0
 

Author Comment

by:rajoo_sharma
ID: 34948502
Hi qwkg,

To overcome the problem of having lots of pages, I'm already using custom post instead of pages.

Thanks
0
 
LVL 31

Expert Comment

by:gwkg
ID: 35030789
When you start your permalinks with %category%  Wordpress creates a new Rewrite rule for each Page.  When Wordpress needs to retrieve content, it compares the permalink to these rules one by one until it finds a match.

If you have limited your pages, then this shouldn't be a problem.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 35030818
My limit for pages is 50.  If my site has fewer than 50 pages I'm good.  More than 50, and I'm using the numerical slugs.
0
 

Author Closing Comment

by:rajoo_sharma
ID: 35170234
Thank you guys, I said the solution was partially easy to follow not because the answer was ambiguous, it was because the way WordPress parses the permalinks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now