开发者

Custom Post Type returning 404

开发者 https://www.devze.com 2023-01-17 16:39 出处:网络
I\'ve got a WordPress CPT that I\'ve had running for a couple weeks. There weren\'t any problems with it.

I've got a WordPress CPT that I've had running for a couple weeks. There weren't any problems with it.

In the last couple days, it's been going haywire. Every few minutes, WordPress forgets t开发者_运维技巧hat the page exists and returns a 404 error. This can be fixed by flushing the permalink rules in the admin panel, but a few minutes later the same things happens and it has to be fixed again.

Does anyone know what could be causing this, or how to fix it?


Here are a few suggestions that will fix the problem.

  1. You may need to whitelist certain files in your wp-admin area. Or, if you can, whitelist all of the files in wp-admin.
  2. Check your .htaccess file - add this code (workaround)
<IfModule mod_security.c>
SecFilterEngine Off
</IfModule>
  1. This sometimes happens when a blog owner publishes a post with the current date, but then edits the post and changes the date of the post.

These are the common problems with 404. Hope it helps.

Whitelist

you can whitelist more than 1 IP, lets say you need to access from school, work place or campus, you just need to add in the network IPs to the "allow from" so it becomes:

Code:

#WP Admin Block
<Files wp-login.php>
order deny,allow
deny from all
allow from 123.456.789.0 ------------->home IP
allow from 321.654.987.1 ------------->work IP
allow from 456.111.222.2 ------------->school IP
allow from 222.555          ------------->library IP
ErrorDocument 403 http://yourdomain.com/
</Files>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号