Problem resolved. It had nothing to do with WordPress. I switched hosters but forgot to switch nameservers. The nameserver has to be switched to the new host once you are no longer using the servers of the old host. So just in case anyone faces the same problem, this is one likely cause.