Support » Fixing WordPress » Permalinks Problem

  • I just installed WP 1.0, and I’m having some issues with permalinks. I currently have a blog, and I’d like to not break all my existing links. What I want to do is
    %postname% does not appear to be working at all, except for one title I have that starts with a numerical character.
    It appears to also loose the year when %monthnum% is defined before %year% – none of the archive links show up with years, and in fact the links on the calendar break as href=”%mon”.
    You can see what I mean here:

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Matt Mullenweg



    Did you run the upgrade script?

    This was a completely fresh install.
    The entries are from my hand-coded blog, hand-imported from my existing db structure:
    insert into
    wp_posts (post_title,post_date,post_content)
    select news.title,news.time,news.body
    from news;
    update wp_posts set post_status = ‘publish’;
    update wp_posts set post_category = 1;
    update wp_posts set post_author = 1;
    insert into wp_post2cat (post_id,category_id) values (2,1);
    insert into wp_post2cat (post_id,category_id) values (67,1);

    I could probably live with changing my urls to %year%.%monthnumber%/%postname% , but %postname% doesn’t seem to be working.

    Well, I figured out the problem. I needed to populate the post_name field in the wp_posts db:
    update wp_posts set post_name = LCASE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(post_title,’ ‘,’-‘),’.’,”),’!’,”),'(‘,”),’)’,”),’\”,”));
    fixed the problem with %postname% for me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Permalinks Problem’ is closed to new replies.