Membership & pretty permanlinks cause 404

I have tried searching the database and there seems to be lots of 404 pretty permalink related issues. Sorry if I haven't been able to work it out from those...
Specs:
WP 3.8.2
Download Membership today.
Current Avada theme version
Running the following plug ins:
bbPress
Gravity forms
Hide my site
Acuity booking appointment tools
Set up a blog on a page using blog shortcodes.
Everything worked beautifully....I reactivated the Membership plug in (started early and realised I needed to create the content to protect!). As soon as I enable the pretty permalinks. I lost all my pages except the home page. So will this plug in work without pretty permalinks? ( it seems to me from reading that this issue has been around in some form or another for a long time)Or is there another solution?
Thanks for your help!

  • Lisa

    Hi Jack,

    Thanks for replying.
    Please don't laugh but I'm new to all this I can see the .htacess file -when I go to view (it uses notepad) the transfer fails. Is there another way I can get it? Also does it make a difference that I have since deactivate membership and been installed and playing with another membership plug in?

    Um Jack its 2.36am in my part of the world so I am off? I will post the file when I read your response later in the morning. Thanks

  • Jack Kitterhing

    Hi there @Lisa,

    Hope you're well today, I'm afraid the file didn't attach.

    It should be visible in cPanel > file manager > public_html, if you open it in file manager and copy the contents into a normal text file, then paste the code here in a reply that would work :slight_smile:

    It's because it's a hidden (dot file), which technically means it's a system file.

    If you'd prefer I'd be happy to take a look if you could send FTP or cPanel details to contact(at)wpmudev.org with the subject line Attn: Jack Kitterhing

    Thanks!

    Kind Regards
    Jack.

  • Jack Kitterhing

    Hi there Lisa,

    It should work now, you was missing the rules in the file, the .htaccess should have been.

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

    I've changed it to that and now when you change your permalinks everything should work still :slight_smile:

    Thanks!

    Kind Regards
    Jack.

  • DavidM

    Hi @Lisa,

    Thanks for your reply. Could you please try resetting your permalinks again by going to your Permalinks page and pressing the save button again?

    That will reset them and sometimes does the trick on its own.

    If that doesn't sort it, could you please try deactivating Membership and letting us know how things work then?

    Just trying to see if the permalink issue only exists when Membership is active.

    Thanks,
    David

  • Lisa

    Hi David,

    1)Ok cleared the cache. Saved the Permalinks 'postname' once - still 404 errors
    Set Permalinks back to default - saved. No errors.
    Saved the Permanlinks 'postname' twice. Still 404 errors.
    Tried all the other permalink options - all got 404 errors but the default.
    2)Deactivated the plug in.
    Saved the Permalinks 'postname' twice. Still got 404 errors.
    3) Deleted the Membership plug in. FTP'ed it back.
    Saved the Permalinks 'postname' twice. Still got 404 errors

    4) Started reading - found this:
    http://wordpress.org/support/topic/possible-quick-way-to-fix-corrupted-permalinks-site-wide

    Went off to database had a look - found the table option but freaked myself out so left.
    5) Read this
    http://wordpress.org/support/topic/how-to-fix-permalink-postname-404-not-found
    Gathered that was what Jack was doing minus the CHMod 666 setting - for which I am glad. From what I read 666 is a daft setting to use - unless you want to give the world access to everything (maybe I am reading about 666 incorrectly?!)
    6) Tried this in custom (just for fun)
    /http:disappointed:listenandconnect.com.au/?p=123/%postname%/
    Didn't work.
    7) Tried filling in the "Title Attributes' on each page - with the name of the page - didn't work.

    Here is the thing I don't understand, everything I'm reading is indicating that this seems to be a problem with the 're-write' something - but I don't actually get that. Logically ( to me anyway :slight_smile: ) the re-write function has to be working if the saved changed permalink results in 404 errors - then something has changed and been 'overwritten' then to change it back and have it work again (default) it has been rewriting something.

    I've been reading Wordpress Web design for Dummies by Lisa Sabin-Wilson(great resource!), thing I don't get is:
    - Permalinks seem predominately designed to utilise permalink tags on blog posts stored in webpages.
    - Web pages as far as I can tell - don't have 'permalink tags' - so it would seem logical that when you set a parameter like %postname% it should return an error because there is no blog post.

    (Remember I don't know much so maybe this is very dopey - sorry)

    The only way I could see this working is if somewhere it said something in the background like (I can't code)
    - if http://yourdomain.com.?p=100/ and permalink wants to be pretty and %postname% is selected
    then %postname% = name of webpage (or H1 or H2). Otherwise I think they probably should fail - and are working as designed.

    Anyway, I am stuck and would be very grateful for your help.
    Many thanks
    Lisa

  • aristath

    Hello there Lisa, I hope you're well today!

    Are you sure your server is using Apache and not something other like for example nginx, IIS or anything similar?
    .htaccess files, mod_rewrite and the rest of this stuff only applies to apache servers.
    If your server is using something other than that we will probably have to follow a different direction!

    Could you pelase post a link to your site so that we may see this in action and hopefully figure out what kind of server you're using?

    Please advise,
    Ari.

  • Lisa

    Hi Ari,
    Before I grant access to the 'backend' what am I actually agreeing to?

    Here's what I have done today:
    1) Changed the permalink setting to postname.
    still got 404 error messages.
    Created two new pages - attached to menus. Pages created with new permalink setting still returned 404 errors.
    Deleted pages. Returned permalink settings to the default. Pages presented fine.
    2) read this in the codex info:
    /**
    Server Blockage: Your host might have blocked the SERVER_SOFTWARE variable and this will cause WordPress' .htaccess generation to fail. If you are sure that your server is running Apache, you can force WordPress to believe that your server is running Apache by changing your wp-includes/vars.php file. Follow the steps below to implement these changes. ? Open the wp-includes/vars.php file using the built in file editor in your WordPress Admin panel. To navigate to this panel, login to WordPress, click on "Manage", then on "Files", scroll to the bottom and type in wp-includes/vars.php into the text box under the "Other Files" title. Look for $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;
    and replace it with // $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;

    ? Add a new line under // $is_apache = strstr($_SERVER['SERVER_SOFTWARE'], 'Apache') ? 1 : 0;

    So I logged on found the file and change it.
    Updated it. Went back to WP and changed the default permalink settings - didn't make a change.Still got 404 error messages.
    So changed it back to what it had.

    3) Changed to the twenty fourteen theme.
    Changed the default permalink settings to postname - didn't make a change.Still got 404 error messages.
    Returned it to the avada theme.
    Deleted the cache.
    4) Deactivated plug in - hide my site.
    Changed the default permalink settings to postname - didn't make a change.Still got 404 error messages.
    Reactivated plug in.
    5) Deactivated plug in - acuity appointment scheduling
    Changed the default permalink settings to postname - didn't make a change.Still got 404 error messages.
    Reactivated plug in.

    So I give up..... I really want to use wordpress and the member plug in to run my business site but I am fast running out of options. My frustrations are self directed - wish I knew how to fix it and didn't have to wait for 24 hours turn around times - damn my location! : )
    I appreciate your help. Thanks again

  • Lisa

    Hi Jack,
    Hope you are having a lovely Easter!
    Browser cache...I don't know how to delete a plug in cache.

    I have a number of versions of pages - wondered if it would be worth deleting the revisions pages.
    All I could see on the codex was that it involved a delete API or you could limit the number of pages stored.
    Haven't done either - would deleting the ' history' so to speak of these pages make a difference?
    Cheers
    Lisa

  • aristath

    Browser cache...I don't know how to delete a plug in cache.

    Well, if you have a caching plugin such as W3 Total Cache there should be a "performance" menu in your dashboard, or your adminbar.
    At least that's what most caching plugins add....

    I have a number of versions of pages - wondered if it would be worth deleting the revisions pages.

    Deleting revisions wouldn't make any difference

    my other thought was to take a copy of the current pages -info and code.
    Then somehow blow the whole thing away and then recreate the pages etc and dump back the data. I guess my question would be - if there is a corrupt something somewhere (lol :slight_smile: ) would I just be dumping it back in the old page code or would blowing away the theme, plug ins etc maybe be worth it?

    That might make more sense....
    To export your content you can go from your Dashboard to Tools => Export and export your content from there.
    Then you can nuke the site and start over. To re-import your data, from your dashboard you can go to Tools => Import and select "Import from WordPress" and upload the export file you previously downloaded.
    This way your settings, plugins, themes etc will be reset and you will have a new site with your content in it.

    A word of advise though... If you choose to do this, then PLEASE don't create your site using an automated WordPress installer such as scriptaculo or anything similar... Instead use the classic, manual installation of WordPress

    Cheers,
    Ari.

  • Lisa

    Hi Jack,

    I've created a wamp server and local version of wordpress. Installed 3.9 and imported the files from live.
    What I didn't realise is it doesn't bring through copies of the form I created nor does it bring through the widgets. Bummer!
    However, the permalinks thing is definitely solved
    I think Jack I will leave live - dodgey as it is sitting there so I can refer to it till I built the other (again!)
    So thank you but I don't think its worth debugging anymore - waste of your time.

    Would you mind please clarifying for me a couple of things:
    1)What is the best way to move from the local to live?
    2) I've been reading about child themes -- I know that are predominately used for structural code changes, however, it seems to me that their is an advantage to building on a child to stop things like my forms and appointment tools and all the design layout changes from being blown away if their is an upgrade to the theme? Am I right in this thinking? Also would this protect my website from being affected by wordpress updates? Please advise.

    Thank you Jack for all your help.
    Cheers
    Lisa

  • aristath

    1)What is the best way to move from the local to live?

    Our Snapshot plugin will do just fine: https://premium.wpmudev.org/project/snapshot/

    2) I've been reading about child themes -- I know that are predominately used for structural code changes, however, it seems to me that their is an advantage to building on a child to stop things like my forms and appointment tools and all the design layout changes from being blown away if their is an upgrade to the theme? Am I right in this thinking? Also would this protect my website from being affected by wordpress updates?

    Using Child themes is a safe way to protect your changes from theme updates, yes. :slight_smile:

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.