At various points of the day my WP permalinks keep breaking. When I’m using custom perms it works but then a few times during the day it just throws a Page Not Found. I fix it by setting perms to default, then back to custom and it works fine.
My Sys Admin can’t figure it out. Hopefully a guru can lend some help?
The problem is indeed most-likely the sCategory Permalink plug-in (the one that gives you
/%scategory%/
. 404s are somewhat common. Go to Options | Permalinks page in Site Admin and click Save Changes to regenerate permalinks. They way to confirm this is to use WP-default permalinks to test behavior. If all is working well, it is the sCategory Permalink.If this isn’t working, publish your .htaccess and that will help us troubleshoot better.
I’d be suspicious of something that is periodically overwriting your .htaccess file. When you set the permalink options, it updates .htaccess. If those settings are being “lost”, there might be another piece of software running on your site that is mucking with the .htaccess file and removing or overriding the WordPress settings.
It seems that something else is automatically changing your htaccess file and overwriting the permalink settings.
What bvandrunen suggested may work. If not, you could set the permalink settings to what you want and then immediately change the permissions of the htaccess file to prevent anything from modifying it. I would suggest using
chmod 644
.Naturally, a better solution still would be to find the script which is modding your htaccess file and get rid of it… but this fix should at least keep your permalinks working!
Do the creation/modification dates of .htaccess change or not? Even if you see no visible changes in .htaccess?
Permlinks are stored in the wp_options table in option_id 34 . Check them and then check after the change takes place.
That should work.
You can try using the ‘try_files’ directive in the Nginx configuration file for your website:
a) Open the configuration file present at â/etc/nginx/sites-enabled/yoursite.confâ or â/etc/nginx/conf.d/default.confâ
b) Then add the following lines under the location / block:
c) It should look like:
You may also check out WordPress custom permalinks and Nginx for detailed information.
I would have to agree with @ahockley since I had this exact same problem with my WordPress blog. Which is happening is that the
.htaccess
file is getting overwritten and then when you set it to custom and then back to default it corrects itself for a while. What I had to do was something like this: (this is the default)Change to:
Once I moved the # BEGIN WordPress out of the blocks the problem stopped. Hope this helps
.htaccess wasn’t uploaded with my build!!!
A stupid mistake in my build process!
You may want to check server limits. We had this issue when MySQL was running out of space. When in your SSH, use
to list files and see if anything has run out of space