Why do I get the message "Cannot connect to server" when I open a WordPress site?

Confirm you are using the correct ports for your WordPress site. WordPress will only function properly with the same Apache port it was originally setup on. It is best to use Apache port 80 for a WordPress website.