Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

For no apparent reason, my wife's blog is only available on the homepage (i.e. the top domain). None of the posts or categories are available and I get a 404 error (a server 404 not a wordpress 404) when I try.

I've done some googling and tried several solutions that worked for others:

  • I tried switching the permalinks to default and back. When the permalinks are on default, the posts work again but the categories still don't work. But when I switch back to %postname% permalinks, the posts go back to not working.
  • I tried deactivating the plugins.
  • I also tried updating wordpress.
  • I tried changing the permissions on my .htaccess file to 666.

I've seen this: After server migration only the homepage works

And this: http://wordpress.org/support/topic/help-only-homepage-works-all-other-links-404

Could be something to do with mod_rewrite? This is a little beyond me... Not sure how to proceed. Anyone have any ideas?

share|improve this question
So you've recently migrated? Did the URL change too? If so, you need to update siteurl and home with the new URL in your options table. – TheDeadMedic Jan 8 '12 at 16:44
No, I didn't migrate anything. We have made no recent changes to the site. This came quite out of the blue. – Flux Capacitor Jan 8 '12 at 17:42
For some reason I woke up this morning and the site appears to be fully functional again. Very strange. – Flux Capacitor Jan 8 '12 at 17:43

closed as too localized by toscho May 2 '12 at 2:24

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

Well, there are a variety of reasons this could be happening. Since this is 404, it should also tell you what file is missing, so please do provide that information. Otherwise, the answer is quite obvious. WordPress uses index.php for all actions regarding to pages by simply using $_GET (index.php?p=12314 etc) so therefore if home page works and other pages don't, it might be mod_rewrite indeed, which for some reason thinks that pages like site.com/page are actually folders and not affiliated with index.php.

Maybe backup database and make a clean install? Or try the following code instead (found from the WordPress site itself)

# 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

If none of those work for you, I'd suggest you to turn to your service provider as they might be having difficulties with serving the mod_rewrite possibility.

share|improve this answer
Thanks for the help. As I said above, I woke up this morning and the site seems to be working again. So maybe it was our hosting account? – Flux Capacitor Jan 8 '12 at 17:44

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