Permalinks keep breaking every few hours.
-
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?
-
The next time your permalinks break, check your .htaccess file, is it blank?
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
What is the purpose of the section before WordPress’s section.
Also, what are you using for your permalink structure?
it is set to post name. not sure what the rest of it is… can I delete it?
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.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.
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?
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 ProExcellent, 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. 🙂
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>And that happened with everything but Akismet and Jetpack deactivated?
If so, let me know, and you might as well reactivate your other plugins.
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
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
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.
- The topic ‘Permalinks keep breaking every few hours.’ is closed to new replies.