hostdoc — offline cPanel/WHM/WHMCS support brain

← all runbooks

---
title: Website is down or showing an error
panel: cPanel / WHM
symptoms:
  - 500 error
  - blank page
  - site will not load
  - shows the wrong content
  - the website is down
  - site is not loading
  - blank white page
  - 500 internal server error
  - the site is offline
  - cannot reach the website
---

# Website is down or showing an error

## 1. Check whether it is the site or the customer's network

**Why:** if it loads for everyone else and not for them, nothing is wrong
with the host and you will waste the whole call fixing the server. Load
the domain from outside their network before you look at anything.

**In the terminal:** `curl -sS -o /dev/null -w '%{http_code}\n' https://<domain>`
from the server or from any other machine.

**Care:** this only reads.

## 2. Check the account is not suspended

**Why:** a suspended account serves a holding page instead of the site,
and the customer reads it as the site being broken. It is the fastest
check and it changes what every later step means.

**In WHM:** Account Information > List Accounts. The Status column says
whether the account is suspended.

**In the terminal:** `ls /var/cpanel/userdata/<user>/*suspended*` shows
the suspension flag.

**Care:** this only reads.

- https://docs.cpanel.net/knowledge-base/accounts/account-suspension-versus-bandwidth-limiting-and-account-termination/
- https://docs.cpanel.net/whm/account-information/list-suspended-accounts/

## 3. Read the error log

**Why:** the log names the failing file and the line, and it separates a
PHP fatal error from a missing file from a database failure. Each of
those sends you to a different step, so reading it first stops you
guessing. This is the step that usually ends the call.

**In cPanel:** Metrics > Errors shows the most recent errors from the
site's PHP and web server.

**In the terminal:** `tail -50 /home/<user>/logs/<domain>.error.log` for
the site's own log, or `tail -50 /usr/local/apache/logs/error_log` for
the server's.

**Care:** this only reads.

- https://docs.cpanel.net/knowledge-base/cpanel-product/the-cpanel-log-files/

## 4. Check the disk space and the quota

**Why:** a full disk produces a 500 with a message about the wrong
thing, and it is easy to lose half an hour to it. Check it before
starting to read application code.

**In cPanel:** Files > Disk Usage shows what is using the space.

**In WHM:** Account Information > List Accounts shows accounts over their
quota.

**In the terminal:** `du -sh /home/<user>/public_html | sort -h | tail`
and `df -h` for the server.

**Care:** this only reads. Do not delete anything on the customer's
account to make room without telling them what you are removing.

- https://docs.cpanel.net/cpanel/files/disk-usage/
- https://docs.cpanel.net/whm/account-information/show-accounts-over-quota/

## 5. Check the database connection

**Why:** a failed database connection surfaces as a 500 on every dynamic
page, which looks like the whole site is broken when it is one setting.
The three things to check are that the database exists, that the user
has been granted access to it, and that the credentials in the site's
config still match.

**In cPanel:** Databases > Manage My Databases shows the databases, their
users and the users' access.

**In the terminal:** `mysql -u <dbuser> -p <dbname>` and check whether
the connection works with the password in the site's config.

**Care:** read only. Changing a database password breaks the site until
the config matches, so if you change one, change both together.

- https://docs.cpanel.net/cpanel/databases/manage-my-databases/
- https://docs.cpanel.net/knowledge-base/sql/how-to-restore-a-user-database-access/