• I’ve configured my sites to render permalinks with post-id/postname.

    The first 10 posts on the site have typical URLs like:

    http://mysite.com/09/my-post-about-buffy-widgets”

    http://mysite/74/a-post-about-badass-widgets”

    However, I’m up to 35 or so posts and I’m seeing that the latest permalinks have a 4 digit post-ids, like this:

    http://mysite/2375/a-post-about-badass-widgets”

    I’m a little concerned about the exponentially growing post-ID. I don’t want it to be that when I’m up to 500 posts, my post permalinks end up with a ridiculously long post IDs of 5 or 6 digits. That just sounds and looks WRONG.

    So, I’m wondering what’s causing this. Any ideas?

    I was thinking it might be the WordPress autosave function or something like that which is causing the subsequent posts to have a much higher post-ID. My guess is that the autosaves take up blocks in the database that cannot be used by subsequent posts. This is forcing WP to make the post-ID of the following post much higher.

    I typically go through my posts with a fine-tooth comb before publishing. This generates at least 10-15 outsaves per post.

    Do you think this might be the problem? I want to correct this now before it gets out of control. Permalinks are no joke.

Viewing 11 replies - 1 through 11 (of 11 total)
  • p.s. with WordPress 3.3 a permalink structure of /%postname%/ (previously not recommended, as you probably know) will no longer be verboten, and in fact will be one of the WP-provided options right in the permalinks settings area. So you may want to wait til 3.3 is released, or try the Beta if your site isn’t live yet.

    Thread Starter eluviis

    (@eluviis)

    Hello zoonini – I’m going to read through that page shortly. Thanks.

    However, if I understand correctly, not having a number initiate the permalink string in no longer a problem eh? INTERESTING.

    My site is live and it has at least 30 posts right now. It’s too late to change my mind.

    However, I don’t mind the number between the domain and postname string, I just don’t want it to grow exponentially like it currently is. Even if I don’t have it showing in the URL, I’d like to keep my database relatively lean. Not OCD lean, but just clean and tidy. So on other sites where I might use postname only, I still know the database would grow like crazy even if I can physically see it. So I’d rather turn off the revisions save feature.

    That way I’ll have the post-ids grow maybe a couple of cents thanks to photo uploads and what not, but at least not be hundreds after only a few posts.

    On it! πŸ™‚ thanks, Danny

    However, if I understand correctly, not having a number initiate the permalink string in no longer a problem eh? INTERESTING.

    It was never a problem not to have a number initiate the permalink string – something like /%category%/%postname%/ was always fine, for example – but it was a problem to have just the /%postname%/ parameter as the permalink setting. If you’re interested, more info here:

    http://digwp.com/2011/06/dont-use-postname/

    Zoonini, your answer seems to be in direct contradiction to the official codex page on Using Permalinks: http://codex.ww.wp.xz.cn/Using_Permalinks A quote from that page (emphasis is mine):

    For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text “page slug” as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best for the first structure tag to be a numeric one, such as /%year%/%postname%/.

    Huh – you’re totally right! Sorry for any confusion.

    You can see a screenshot of the new 3.3 /%postname%/ option in #5 here:

    http://hellboundbloggers.com/2011/11/05/new-features-of-wordpress-3-3/

    Thread Starter eluviis

    (@eluviis)

    One more question though zoonini – I’m adding a PHP string right now to wp-config.php to keep the revision count down to “2” only.

    My questions is, will this keep the growth of the database per post limited to 2 extra lines for those revisions (of course, excluding images and such) or will the database keep growing due to each autosave every 60 seconds?

    Hmm – I don’t know. Could you check the database after an hour or two to see directly?

    Thread Starter eluviis

    (@eluviis)

    I will. I mean, I need to post first πŸ™‚ – I’ll be working again tonight and publishing. I’ll keep an eye out to see if the database keeps growing with the autosaves.

    Tricky stuff O.o

    OK, good luck!

    I take it you’ve already seen that you can reduce the frequency of autosaves as well:

    http://codex.ww.wp.xz.cn/Editing_wp-config.php#Modify_AutoSave_Interval

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘WordPress Post-ID Exponential Growth Technical Question’ is closed to new replies.