Discussion:
Static string in permalinks and page with the same name, bad?
Aahan Krish
2014-02-06 15:53:42 UTC
Permalink
Hello,

I am using a static string 'archives' in my permalinks. My blog's permalink
structure looks like this: /archives/%postname%/

And my blog has two pages: About me (about-me) and a blank page called
Archives (archives)

In Dashboard > Settings > Reading, the 'Front page displays' option is set
to a static page, with 'about-me' acting as the front page and 'archives'
acting as the blog archive.

Considering that I am already using 'archives' in my permalink structure,
is this to be considered a bad practice?

NOTE: The very reason why I am using a static string in my permalink
structure is to avoid those edge-case performance issues seen when a blog
happens to have a large number of pages with complex relationships
(sub-pages, sub-sub-pages), etc.

With the current settings in place, will the 'static string' still help? Or
should it be changed to something unique (e.g. different from any page,
category, tag, or post slug)?

PS: Would love to know what Otto has to say! =)

best,
Aahan
Otto
2014-02-06 20:16:25 UTC
Permalink
Post by Aahan Krish
NOTE: The very reason why I am using a static string in my permalink
structure is to avoid those edge-case performance issues seen when a blog
happens to have a large number of pages with complex relationships
(sub-pages, sub-sub-pages), etc.
With the current settings in place, will the 'static string' still help? Or
should it be changed to something unique (e.g. different from any page,
category, tag, or post slug)?
PS: Would love to know what Otto has to say! =)
Those performance issues you speak of were fixed in WordPress 3.3.

-Otto
Aahan Krish
2014-02-07 08:28:27 UTC
Permalink
Hello Otto,

I should have been more clear. I do know that the performance issues have
been fixed in 3.3. I wasn't talking about that.

If I am not wrong, WordPress builds the rewrite rules and stores somewhere
in the database for quick lookup. So when a post/page is requested in
quickly goes through the rules and shows the relevant page. The complex the
permalink structure, the bigger the no. of rules (or something along the
lines).

I want to make it *as easy/fast as possible* for wordpress to differentiate
between posts, pages and other post types. One way to do it, I read, is to
start the permalink structure with a numeric (Post ID, Year, Month, Date)
or static string (as in my case "archives") and end the permalink structure
with something unique (Post ID or Postname).

Considering that, theoretically, these permalink structures would perform
best (descending order):

- /archives/%post_id% or /archives/%postname%/

- /%post_id%/%postname%/ or /%year%/%postname%/

Of course, I do acknowledge that there are no "performance issues" with
other permalinks, but better is still better, IMHO.

Considering that I am correct so far, does using the static string
'archives' help in *my case*? (Because I also have a page with the same
slug, all explained again below.)

..........

I am using a static string 'archives' in my permalinks, and my blog's
permalink structure looks like this: /archives/%postname%/.

I want a static homepage to be displayed on the home page, so I created two
new pages: 'Home (home)' and a blank page called 'Archives (archives)'. In
Dashboard > Settings > Reading, the 'Front page displays' option is set to
a static page, with the page 'Home (home)' acting as the front page and the
page 'Archives (archives)' acting as the blog archive.

Considering that I am already using 'archives' as a static string in my
permalink structure and there's a page with the same slug, does the static
string actually help as it usually would in normal cases?

Or should the static string be changed to something unique (e.g. different
from any page, category, tag, or post slug)?

- - - - - - - - - -

Thanks for your time!
Aahan Krish
2014-02-08 04:18:29 UTC
Permalink
Ah, nevermind. I didn't know that verbose rewrite rules aren't triggered
anymore for permalink structures like /%postname%/ and
/%category%/%postname%/. That makes this question irrelevant. Puff!

Again, thanks for your time Otto!

best,
Aahan

Loading...