WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Running WP locally and permalinks problem. (5 posts)

  1. AssassiNBG
    Member
    Posted 6 years ago #

    I'm using xampp and trying to run wp 2.3 locally but there seems to be a problem with the custom permalinks in the following format:

    /%category%/%postname%/

    I installed wp2.3 fresh and then imported a database backup of my website using phpmyadmin. All went ok, just changed the home_url (or whatever they were) options in the database to localhost instead of my domain.

    And then if I use the default permalinks (e.g. ?p=xx) it works ok for displaying posts and categories, but not pages. If I apply the new custom permalinks it gives a 404 Object not found! error everywhere (pages/posts/cats). I believe it tries to look for a directory e.g http://localhost/wordpress/category1/post1/ when in fact that directory does not exist on my local computer and neither should it. It should recognize the urls automatically, doesn't it?

  2. Ivovic
    Member
    Posted 6 years ago #

    you'll need to enable mod rewrite in xampp to make this work, in the same way that mod-rewrite needs to be enabled anywhere else this permalink structure is required.

    This is URL trickery, it's a nice thing to have, but not universally supported or enabled, and not a basic function of all web server software, so more generally speaking, enabling URL modification is a bad idea if you think you might change platforms at some stage.

    Having said all that, if you google 'xampp mod rewrite' you should be able to find how to enable it.

  3. Ivovic
    Member
    Posted 6 years ago #

    in fact, try this for a start:

  4. AssassiNBG
    Member
    Posted 6 years ago #

    Nice, it worked beautifully! Thanks!

  5. Ivovic
    Member
    Posted 6 years ago #

    welcome :)

Topic Closed

This topic has been closed to new replies.

About this Topic