Support » Localhost Installs » Permalinks on localhost yields 404

  • Hi! I have created a local copy of my wp site onto my local machine to test updated plugins. I have followed the steps from here and so far the site displays the home page.

    However, when I click on any of the pages/posts I get “Not Found” errors. I have changed the Permalink structure to Default and it seems to work fine now. However, this defeats the purpose of why I copied the site locally.

    I need to make the Permalinks work. (I’m using: /%category%/%postname%/)

    .htaccess is configured as:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    Any help anyone could give would be greatly appreciated! Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • My guess would be that you don’t have mod_rewrite enabled. You’ll have to locate your Apache httpd.conf file and check the settings.

    If you want to use permalinks, you will need to make a change inside another file:
    apache > Conf and find the file httpd.conf. Open that in a text editor. Use the search facility in the editor to find “rewrite”. The line you need looks like this:

    #LoadModule rewrite_module modules/

    You need to take away the hash sign so it looks like this

    LoadModule rewrite_module modules/

    Now just save the file.

    I was also running into the same problem (on a live server) and thought it was a permalinks issue. I tested it on two sites locally and also kept getting 404 errors only on subpages. The fix Samuel provided works perfectly and there’s no more errors. Now I need to call up my hosting provider and get them to fix Apache on their end.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Permalinks on localhost yields 404’ is closed to new replies.