• Problem:
    Setting anything other than the default permalink results in a link like this:
    https://localhost/sample-page/

    Choosing day and name, month and name or numeric produce the link above, instead of (for example):
    https://localhost/2015/02/02/sample-post

    Even putting /%author%/%postname%/ in the Custom Structure box and clicking Save does the same thing — despite the info box at the top of the screen showing “Permalink structure updated.”

    Background:
    A new installation on a local Linux machine.
    Apache allows mod_rewrite
    AllowOverride enabled.
    .htaccess is being updated.

    So what am I missing?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @groff,

    Did you check if the .htaccess is indeed upgraded (by manually displaying it like eg. cat .htaccess)? I’ve seen the case when WP said it was but it in fact wasn’t…

    A.

    Thread Starter Geoff Palmer

    (@groff)

    @a,

    Good point!

    You’re right. It’s not actually being updated! Clearing it out and making a permalink change does nothing to it, despite the messge “Permalink structure updated.”

    So why isn’t .htaccess being written? I’ve got wp_debug on but get no errors.

    @groff

    Probably it has something to do with Linux’es file permissions. Try setting it (only for the moment!) writable for everyone.

    At Linux console change to WP directory where the .htaccess is then

    chmod 0777 .htaccess

    Now try to set your permalink structure through WordPress and see again if .htaccess has been indeed upgraded. If yes, you’ve got your answer but you’ll also have to find such permissions combination that will let WP upgrade file and don’t let anyone/else write to it.

    Or – as the permalink structure is usually being set once and rarely changed – you may just give the file 0777, upgrade permalinks and then give the file 0444 which will prevent .htaccess from being written at all (it’s great for security, however may cause problems in future if some plugin will need to update it).

    A.

    Thread Starter Geoff Palmer

    (@groff)

    @a.

    That’s it! Forgot the file permissions!! Actually, 644 works fine — which I think is the defauilt.

    Thanks for your help, Adam. Much appreciated. I’ll mark this “resolved”.

    Cheers,
    Groff

    Glad to help ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Permalinks only half-working’ is closed to new replies.