Support » Fixing WordPress » How to Fix 404 Permalinks

  • I wanted to post this because I saw quite a few people having the problem that I was having. I managed to find one thing that caused my problem, as opposed to disabling this plugin or that plugin, none of which I had installed.

    The problem:
    When changing the default permalink configuration from ?p=5 to /2013/05/my-cool-post, all of a sudden the links to both the posts themselves and to the comment buttons were giving 404 errors. After much searching.

    Supporting Evidence:
    Some people reported having multiple sites hosted in the same wordpress account or hosting account, but only having this problem with 1 site. This tells me that it is specific to the site, not the hosting provider, or even WordPress. That’s what led me to the solution.

    The solution:
    While perusing through the httpd.conf file on my system, I was looking at the following:

    <Directory />
        Options Indexes FollowSymLinks Includes +ExecCGI
        AllowOverride None

    Notice that “AllowOverride None” is set, which basically disables mod_rewrite (an apache module necessary for WordPress to be able to rewrite your urls — ie use Permalinks). I changed this to “All”, and restarted httpd, but still had the same issue.

    Finally I went through and searched for “Directory”, and there are quite a few of them in there, but then I found another stanza:

    <Directory "/var/www/html">

    With quite a few comments inside of it. (That’s why I didn’t notice it the first time around.) Inside that Directory stanza, was this:

    AllowOverride None

    This one was overriding the “/” directive earlier, so as soon as I changed this from “None” to “All”, and restarted httpd, my links worked perfectly afterward.

    I hope this helps you guys, it seems to be a chronic problem in WordPress.

Viewing 5 replies - 1 through 5 (of 5 total)
  • This is actually Host Environment specific – not WordPress specific.

    @seacoast Web Design

    Yep’, that’s true. But, remember when you were starting out? And how good it felt when you discovered and solved something all on your own, and you couldn’t wait to share it just because you thought it might help others?

    And you gotta’ admit, that’s a pretty constructive synopsis.. 🙂


    Kudos on chasing that puppy right down to your httpd.conf. Some additional reference material if you like: Using Permalinks and Using “Pretty” permalinks

    That assumes that the AllowOverride directive within the Directory section in httpd.conf has been configured, which is as Seacoast notes, a server configuration, rather than something controlled by WordPress. The default state is (generally speaking) AllowOverride None.

    there are quite a few of them in there, but then I found another stanza:

    Example of what it might look like in the httpd.conf

    <Directory "/var/www/html">
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    # The Options directive is both complicated and important.  Please see
    # for more information.
        Options Indexes FollowSymLinks
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
        AllowOverride None
    # Controls who can get stuff from this server.
        Order allow,deny
        Allow from all

    @ Clay,

    If I was just starting out, this would not be my first post. A page of code? Nope..

    Obviously anything that is resolved with editing your httpd.conf is not specific to just WordPress. There are two major reasons why I posted that here:

    • Tons and tons of users were having the same issue, and would likely search here for solutions
    • Most (and I’m using that term conservatively) people are not web developers or designers and may only be using WordPress, so wouldn’t experience this problem in any other fashion.

    Lastly, if you would have read my post thoroughly, I said in the “Supporting Evidence” section:

    This tells me that it is specific to the site, not the hosting provider, or even WordPress.

    (That is to say, its NOT a wordpress issue, but a site issue. Site as is defined within your httpd.conf file, something that wordpress obviously never changes.)

    Technically it’s not specific to the host, but to the site, because you can have multiple sites configured within one host (as I do) and have different directives for each site, with different options.

    @seacoast Web Design

    Well, that wasn’t exactly my point, but no matter. *sigh* Hubris is such a powerful blindfold. I guess it catches us all off guard on occasion.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to Fix 404 Permalinks’ is closed to new replies.