WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't Change Permalink Structure - Breaks Entire Site (13 posts)

  1. willusername
    Member
    Posted 1 year ago #

    I just set up a WordPress site and am trying to install the Buddypress plugin.

    For the plugin to function, it needs me to use a Permalink structure other than the default.

    When I switch the default to anything else - absolutely every page except my homepage returns a 404 Page Not Found error.

    It even gives me a 404 when I try to view the page directly from it's exact link, preview page, or view page buttons. There is absolutely ZERO WAY for me to even LOOK at my page if the permalink structure is not set at default.

    Why is this happening? How do I fix it? I can't progress with my site if I can't change this option - I'm dead in the water.

  2. horvelod
    Member
    Posted 1 year ago #

    On your server the php mod_rewrite function enabled?
    Is the .htaccess file in wordpress root directory created(or writable)?

  3. willusername
    Member
    Posted 1 year ago #

    I'm hosting the server locally with WAMP - where do I find that function?

    there is an htaccess file in my root directory and i'm able to edit it with notepad.

  4. damsko
    Member
    Posted 1 year ago #

    You will probably need to add this to your .htaccess:

    <IfModule mod_rewrite.c>
     RewriteEngine On
     RewriteBase /
     RewriteRule ^index\.php$ - [L]
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule . /index.php [L]
    </IfModule>

    That should enable the permalinks.

    For the exact code check your WP > Settings > Permalinks

  5. willusername
    Member
    Posted 1 year ago #

    My htaccess already has that code in it. No matter what I do I can not view any pages except home page unless Permalinks are set to default.

  6. damsko
    Member
    Posted 1 year ago #

    You might need to clear you browser cache. Just close the browser and try again.

    PS OK that will not work when the code was allready there...

  7. willusername
    Member
    Posted 1 year ago #

    Emptying the cache doesn't work either.

  8. damsko
    Member
    Posted 1 year ago #

    No, i also thought that as the code allready was in your .htaccess

    Not sure what could be causing the problem when it is not the missing rewrite. Will have a think.

    Does the wordpress run from the root of your site? when it runs from a directory then that should reflect in the rewrite:

    RewriteBase /

    versus:

    RewriteBase /directory/

  9. willusername
    Member
    Posted 1 year ago #

    Yes, it appears it is a root. I'm running it off of a local WAMP host until it's ready to be put on the Internet.

    here's the exact code in that file in case it helps:

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

    paths appear to be correct to me.

  10. damsko
    Member
    Posted 1 year ago #

    OK without BuddyPress plugin activated are you able to enable and use a permalink structure other then default with WordPress?

    When that also does not work then it could be that 'mod_rewrite' is not enabled on WAMP. You will need to figure out how to get that done. Google is your friend in such a case i think.

    Perhaps: http://blog.cmstutorials.org/tutorials/tips-tricks/how-to-make-mod_rewrite-work-on-wamp

  11. willusername
    Member
    Posted 1 year ago #

    aha, that was it.

    In case anyone else quickly needs to see what worked for me - i just had to click WAMP and make sure Apache > Apache Modules > Rewrite Module was checked.

    Thanks!

  12. damsko
    Member
    Posted 1 year ago #

    Nice one! Succes with the site.

  13. dheyvidlee
    Member
    Posted 6 months ago #

    kudos to damsko and willusername. solved my issue immediately

Topic Closed

This topic has been closed to new replies.

About this Topic