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 that 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?

Errors: Some of these:

[Fri Sep 24 04:11:17 2010] [error] [client] Invalid method in request \\n\\n

More of these (tv2 is the slug for the CPT):

[Fri Sep 24 03:25:15 2010] [error] [client] File does not exist: /var/www/vhosts/default/htdocs/tv2

And a ton of these:

[Fri Sep 24 03:58:36 2010] [error] [client ::1] Directory index forbidden by Options directive: /var/www/html/
  • Is anything showing up in the error logs?
    – Chris_O
    Sep 24, 2010 at 13:53
  • Some errors from the apache log are in the original question now. Thanks.
    – jdp
    Sep 24, 2010 at 14:07
  • That last line looks like it comes from a localhost request, perhaps a cron job? Since you say it happens every five minutes, maybe there is the source of your problems?
    – Jan Fabry
    Oct 7, 2010 at 9:14

2 Answers 2


I do not know the specific path layout on your webserver, but the entries from the error log do not look to me that it is specifically wordpress related:

Invalid method in request \\n\\n

This error is caused by an invalid HTTP request. Each HTTP request has a method. Most certainly it was missing in the request that resulted in the log entry.

File does not exist: /var/www/vhosts/default/htdocs/tv2

A File does not exists message isn't normally created when a PHP script returns 404 response headers. So most certainly, this error was not reported by Wordpress but by the server itself. Probably the mod_rewrite configuration for your wordpress blog was unavailable.

Directory index forbidden by Options directive: /var/www/html/

This looks the same to me. If /var/www/html/ is the webroot of your blog, then this shows that index.php has not been found or wasn't looked for as directory index by your webserver.

So in the end this looks very much like a webserver configuration issue to me. Permanently rebuilding permalinks wouldn't help here either then. If you are unsure, you can make use of the Permafrost (Wordpress Plugin). A related question regaring 404 errors and permalinks is: single-type.php not working, delivering 404.


My first instinct is that a plugin might be to blame. Many plugins that touch the WordPress rewrite engine will flush the rewrite rules whenever they're used rather than when they're first activated (which is what they're supposed to do).

So I'd double check your plugins and see if any of them are touching the rewriter or calling flush_rewrite_rules() and, if so, deactivate them and see if that solves the problem. If you have to live without a feature for a day or two to diagnose the problem, I'd say that's worth it.

  • It doesn't seem to be a plugin issue. I haven't added any new plugins in a couple of weeks, and this issue just appeared in the last couple of days. Also, it doesn't break every page load, but rather every few minutes or so.
    – jdp
    Sep 24, 2010 at 15:16
  • Then my next best guess would be a server configuration issue. If you haven't changed anything on the WordPress side of things, the only way you could be experiencing this kind of issue is if your host changed something. I suggest contacting them and asking the same question.
    – EAMann
    Sep 24, 2010 at 15:32
  • I am the host. :( Thanks for the advice though, I appreciate it.
    – jdp
    Sep 24, 2010 at 15:43
  • Has anything changed in your server configuration? Maybe a system update?
    – EAMann
    Sep 24, 2010 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.