WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks on localhost yields 404 (4 posts)

  1. ramcar71
    Member
    Posted 3 years ago #

    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]
    </IfModule>
    # END WordPress

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

  2. Nikki Blight
    Member
    Posted 2 years ago #

    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.

  3. Samuel B
    moderator
    Posted 2 years ago #

    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/mod_rewrite.so

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

    LoadModule rewrite_module modules/mod_rewrite.so

    Now just save the file.

  4. illusiodesign
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic