Permalinks Problem (5 posts)

  1. Anonymous
    Posted 11 years ago #

    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:

  2. Matt Mullenweg
    Posted 11 years ago #

    Did you run the upgrade script?

  3. Anonymous
    Posted 11 years ago #

    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);

  4. Anonymous
    Posted 11 years ago #

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

  5. Anonymous
    Posted 11 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.