• Every few hours, all my pages get the 404 error. I go in and reset them, and they are good for about 2 hours, and they break again. Everything goes back up after I reset and save. My homepage is always good.

    I have disabled all plugins and updated everything. Help?

Viewing 15 replies - 1 through 15 (of 21 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    The next time your permalinks break, check your .htaccess file, is it blank?

    Thread Starter NathanNeighbour

    (@nathanneighbour)

    It says this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} (google|yahoo|msn|aol|bing) [OR]
    RewriteCond %{HTTP_REFERER} (google|yahoo|msn|aol|bing)
    RewriteRule ^([^/]*)/$ /starting.php?p=$1 [L]
    </IfModule>
    # 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

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    What is the purpose of the section before WordPress’s section.

    Also, what are you using for your permalink structure?

    Thread Starter NathanNeighbour

    (@nathanneighbour)

    it is set to post name. not sure what the rest of it is… can I delete it?

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Yeah, go ahead and just empty out the .htaccess file (you have it all here if you need to add it back, of course).

    Then, try re-saving your permalink structure at Settings/Permalinks in your admin panel. If WordPress cannot automatically edit the .htaccess file, it will provide manual instructions after saving.

    Thread Starter NathanNeighbour

    (@nathanneighbour)

    OK… so frustrating. I’ve tried everything and it’s still happening. Updated everything. Disabled all the plugins, and deleted my .htaccess file. It is now back to this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} (google|yahoo|msn|aol|bing) [OR]
    RewriteCond %{HTTP_REFERER} (google|yahoo|msn|aol|bing)
    RewriteRule ^([^/]*)/$ /starting.php?p=$1 [L]
    </IfModule>
    # 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

    Anything else I can try? I seems do be good for a few hours and then go down.

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Very strange, something is adding that first bit at least.

    Try the same again, clearing the .htaccess file, deactivating all plugins, re-saving permalinks, then leave everything but Akismet (or other anti-spam plugin) off for the day to see if the above comes back.

    Meanwhile, which plugins do you have installed?

    Thread Starter NathanNeighbour

    (@nathanneighbour)

    ok… did all that…

    after I re-saved the permalinks, the .htaccess file now reads:

    # 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

    Plugins:
    Askiet
    Anti-Malware by ELI (Get Off Malicious Scripts)
    Elegant Themes Uploader
    Facebook Like
    Jetpack
    Page Links To
    Post Types Order
    Wordpress SEO
    Social Media Icons Widget
    Visual Form Builder Pro

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Excellent, leave it as-is with only Akismet enabled, you can enable Jetpack too, that can’t modify .htaccess.

    Let’s see how it goes for the day. Basically, I want to rule-out plugins as the cause. 🙂

    Thread Starter NathanNeighbour

    (@nathanneighbour)

    did it AGAIN! this time the .htaccess says this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} (google|yahoo|msn|aol|bing) [OR]
    RewriteCond %{HTTP_REFERER} (google|yahoo|msn|aol|bing)
    RewriteRule ^([^/]*)/$ /starting.php?p=$1 [L]
    </IfModule>

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    And that happened with everything but Akismet and Jetpack deactivated?

    If so, let me know, and you might as well reactivate your other plugins.

    Thread Starter NathanNeighbour

    (@nathanneighbour)

    Sad news… broken again.

    All plugins disabled. The .htaccess was wiped clean. However, this morning it once again reads:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_USER_AGENT} (google|yahoo|msn|aol|bing) [OR]
    RewriteCond %{HTTP_REFERER} (google|yahoo|msn|aol|bing)
    RewriteRule ^([^/]*)/$ /starting.php?p=$1 [L]
    </IfModule>
    # 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

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    Ok, it’s time to get in touch with your hosting provider. Something is adding that junk to your .htaccess file, and it’s definitely not WordPress.

    I’m having the same problem, but on a live site – so disabling all plugins will make the site look awful.

    I’ve talked to GoDaddy (moving later this year, so please don’t lecture me on how bad they are), and they say the same thing “Disable all your plugins”.

    Can anyone tell me how to determine which plugin is changing/deleting the HTAccess file?

    Thanks so much to everyone for your help!

    Dave

    Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    The only way to determine which plugin is causing the problem is to disable all plugins and re-activate each on individually until you find the cause.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Permalinks keep breaking every few hours.’ is closed to new replies.