Wordpress permalink issues?

Discussion in 'Blogging' started by Loadzz, Jun 1, 2016.

  1. Loadzz

    Loadzz Regular Member

    Joined:
    Jun 28, 2014
    Messages:
    265
    Likes Received:
    37
    Location:
    United Kingdom
    Hello,

    I'm having an issue trying to change my sites permalink on my Wordpress website.

    Wordpress version: 4.5.2

    My current structure is: /%post_id%-%postname%/
    I'd like to change it to /%category% /%post_id%-%postname%/ for SEO purposes.

    When update my URL structure my previous URL's break - I have rewrite enabled for my .htaccess

    What could be the issue breaking my sites URL's?

    Any help is appreciated.
     
  2. BlogPro

    BlogPro Jr. VIP Jr. VIP

    Joined:
    Apr 23, 2012
    Messages:
    621
    Likes Received:
    586
    Home Page:
    PM me your site URL and admin details and I'll fix it for you.
     
  3. Loadzz

    Loadzz Regular Member

    Joined:
    Jun 28, 2014
    Messages:
    265
    Likes Received:
    37
    Location:
    United Kingdom
    Don't feel comfortable sending over admin details.. Do you reckon it's something with the .htaccess?
     
  4. Conor

    Conor Elite Member

    Joined:
    Nov 7, 2012
    Messages:
    3,617
    Likes Received:
    6,074
    Gender:
    Male
    Location:
    South Africa
    "Break" meaning you get a 404 error? Make sure you have mod_rewrite enabled on your server.
     
  5. Loadzz

    Loadzz Regular Member

    Joined:
    Jun 28, 2014
    Messages:
    265
    Likes Received:
    37
    Location:
    United Kingdom
    Yeah, not found errors - I have Apache server, so host confirms mod_rewrite is already enabled.

    I've also tried changing .htaccess to 777 permission, still no luck.
     
  6. Conor

    Conor Elite Member

    Joined:
    Nov 7, 2012
    Messages:
    3,617
    Likes Received:
    6,074
    Gender:
    Male
    Location:
    South Africa
    Nothing should ever be 777 permission, least of all the htaccess file. That's a huge security hole right there.

    Try backing up your htaccess file, deleting its contents and then try saving your permalink settings again.
     
    Last edited: Jun 2, 2016
  7. qrazy

    qrazy Senior Member

    Joined:
    Mar 19, 2012
    Messages:
    1,115
    Likes Received:
    1,726
    Location:
    Banana Republic
    I recently had the same issue with a new host, where .htaccess file generation was perfect, but somehow custom URLs show 404 errors. The following changes to the config file (/etc/apache2/apache2.conf in my case) solved it for me.

    Replace "AllowOverride None" to "AllowOverride All"

    My config file would look like this

    Code:
    <Directory />
      Options FollowSymLinks
      AllowOverride All
    </Directory>
    
    <Directory /var/www/>
            Options Indexes FollowSymLinks
            AllowOverride All
            Require all granted
    </Directory>
    
     
  8. BlogPro

    BlogPro Jr. VIP Jr. VIP

    Joined:
    Apr 23, 2012
    Messages:
    621
    Likes Received:
    586
    Home Page:
    Wait, let me clarify.

    So your current page, for instance is,

    http://site.com/432432/post-name

    You now want to make it

    http://site.com/category/432432-post-name

    So when you update the permalinks

    http://site.com/432432/post-name doesn't work?

    Is that correct?
     
  9. Loadzz

    Loadzz Regular Member

    Joined:
    Jun 28, 2014
    Messages:
    265
    Likes Received:
    37
    Location:
    United Kingdom
    My config file reads:

    Code:
    <Directory "/">
    Options ExecCGI FollowSymLinks IncludesNOEXEC Indexes SymLinksIfOwnerMatch
    AllowOverride All
    </Directory>
    
    My current URL setup is: http://site.com/432432-post-name

    I'd like it: http://site.com/category/432432-post-name

    Thanks :)
     
  10. Loadzz

    Loadzz Regular Member

    Joined:
    Jun 28, 2014
    Messages:
    265
    Likes Received:
    37
    Location:
    United Kingdom
    Will give this a go shortly, thanks :)