• Just curious about something that our hosting admin told us. We have a site in a sub-folder (www.ourdomain.com/subsite) and the other day the entire subsite was unavailable. when you typed in the url http://www.ourdomain.com/subsite, you would get an Error 404 page generated on the main site.
    What is weird is, when we asked our admin what the issue was, they said that they had removed the database for the sub site to do some work with it.
    Shouldn’t that subsite url have said Error 500 Cannot make connection to Database instead if there was no database to connect to?

    Again, just curious if this would be the case. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p

    (@t-p)

    – you get 404 if you are trying to access a file which is not there. In other words, 404 indicates failure to communicate with the server.
    – You get 500 error message when a user tries to access your Apache or Lighttpd based dynamic php application (such as forum or blog software).
    – you get “Error establishing a database connection!” if WP is unable to establish a database connection.

    Thread Starter jennsweb

    (@jennsweb)

    So even if they had an entire separate wordpress install in a subfolder, going to that subfolder would still generate error 404 and not Error Establishing Database Connection?

    In your case you’ll get a 404 error because there’s no content for the site to show, because all of the content has been “removed”.

    Depending on how the site is set up, it does seem a bit strange though… not having a database should show a database error message, not a 404. You’d also wouldn’t see any of the standard WordPress templates or HTML. It sounds like it was something else, but they aren’t going to tell you what it really was.

    I’d suggest that you take a full backup of the database and all of the sites files now, just in case something happens again. It shouldn’t, but… there’s no such thing as too many backups!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error 404 possible with no database’ is closed to new replies.