In short
cPanel error logs live in three places: the Errors screen under Metrics shows the web server's latest errors, the Raw Access screen provides the raw access log for each domain, and error_log files in your site's directories record PHP errors. Each access log line includes the IP, timestamp, requested URL, status code and user agent, and filtering on these fields lets you spot bot traffic and attack attempts.
In this guide
When your site throws an error, slows down or shows suspicious activity, logs are the first place to look instead of guessing. cPanel error logs and access logs record every request that reaches the server, the response it got and every warning PHP generates. In this guide, you'll learn where each log lives, how to read a log line, and how to pick out bot traffic and signs of attacks.
The three main log types in cPanel
| Log | Where to find it | What it shows |
|---|---|---|
| Access log (Raw Access) | Metrics > Raw Access, or ~/access-logs/ over SSH | Every incoming request: IP, time, URL, status code, size, browser |
| Web server error log (Errors) | Metrics > Errors | Access denials, missing files, .htaccess and permission errors |
| PHP error log | The error_log file in the directory where the error occurred | Fatal error, Warning, Notice and Deprecated messages |
In short: if a page shows a blank white screen or a 500 error, check the PHP error_log file and the Errors screen first; if you suspect a traffic, bot or attack issue, check the access log.
How to download the access log (Raw Access)
- Log in to cPanel and click the Raw Access icon in the Metrics section.
- In the list of domains, click the link for the domain you need to download the current log as a compressed
.gzfile. - If you check Archive log files to your home directory in the configuration section at the top of the page, logs are archived monthly and kept in the
logsfolder in your home directory. You can also set the option to remove old archives to protect your disk quota. - Extract the downloaded file with a tool like 7-Zip and review it in a plain text editor.
If your plan includes SSH access, you can read the logs directly on the server without downloading them. Current logs are in the ~/access-logs/ folder; HTTPS requests are usually written to a file named alanadi.com-ssl_log (with your domain name). If you're new to the terminal, start with the guide cPanel SSH access and terminal basics.
How to read an access log line
cPanel servers write access logs in a standard format called the Combined Log Format. A sample line:
203.0.113.45 - - [02/Dec/2026:14:05:31 +0300] "GET /urunler/ HTTP/2.0" 200 18342 "https://www.google.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) ..."- 203.0.113.45: The IP address that made the request.
- [02/Dec/2026:14:05:31 +0300]: The time of the request and the time zone.
- "GET /urunler/ HTTP/2.0": The request method (GET, POST), the requested URL and the protocol.
- 200: The HTTP status code. 2xx means success, 3xx a redirect, 4xx a client error (404 not found, 403 forbidden) and 5xx a server error.
- 18342: The size of the response in bytes.
- "https://www.google.com/": The page the visitor came from (referrer).
- Last field: The user agent, the string the browser or bot uses to identify itself.
The Errors screen and the PHP error_log file
The Errors screen in cPanel shows the most recent error lines the web server logged for your account. The messages you'll see most often are:
- File does not exist / No such file: A deleted image, a broken link or a bot scan. An occasional one is nothing to worry about.
- client denied by server configuration: An .htaccess rule or IP block rejected the request. These lines are the first clue to why a visitor is getting a 403 Forbidden error.
- Permission denied / file is writable by others: File permissions are wrong. Files typically use 644 and folders 755.
PHP errors, by default, are written to a file named error_log in the directory of the script that generated them. On WordPress sites, you'll find this file in public_html, wp-admin or a plugin's folder. The label at the start of each line tells you how serious the error is:
- PHP Fatal error: The script stopped and the page won't load. Fix it right away. For example,
Allowed memory size exhaustedpoints to the memory limit, andCall to undefined functionpoints to a missing PHP extension or an incompatible version. - PHP Warning: The script keeps running, but something went wrong; keep an eye on it.
- PHP Notice and Deprecated: Usually harmless, but they can turn into errors when you move to the next PHP version.
You can manage PHP log settings in cPanel's MultiPHP INI Editor. On a live site, display_errors should be off and log_errors on, so errors are logged but never shown to visitors. For detailed logging in WordPress, add the following to wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );With this setting, errors are written to wp-content/debug.log. Once the issue is fixed, set WP_DEBUG back to false and delete the log file; log files left in a publicly accessible directory can expose your site's internals. If you're getting a 500 error, the 500 Internal Server Error troubleshooting guide takes you straight to the relevant log lines.
Spotting bot traffic in the logs
The commands below quickly summarize the access log over SSH. Replace ornek.com-ssl_log with your own domain.
# Top 20 IPs by number of requests
awk '{print $1}' ~/access-logs/ornek.com-ssl_log | sort | uniq -c | sort -rn | head -20
# Top user agents by number of requests
awk -F'"' '{print $6}' ~/access-logs/ornek.com-ssl_log | sort | uniq -c | sort -rn | head -20
# Breakdown of status codes
awk '{print $9}' ~/access-logs/ornek.com-ssl_log | sort | uniq -c | sort -rnWhen interpreting the results, keep the following in mind:
- Search engine bots such as Googlebot, Bingbot and YandexBot are normal. But user agents are easy to fake; you can verify whether an IP really is Googlebot with a reverse DNS lookup like
host 66.249.66.1and checking that the returned name ends ingooglebot.comorgoogle.com. - SEO and scraping bots (AhrefsBot, SemrushBot, various AI crawlers) can send high volumes of requests and consume resources. If you don't need them, you can limit them with
robots.txt. - A single IP generating hundreds of 404s in a short time is usually a scanner looking for vulnerabilities.
Reviewing a specific time window
If you know when a problem started, narrowing the log to that hour makes analysis much easier. Because the date field is written as day/Month/year:hour, a simple grep is all you need:
# Requests on December 2, 2026, between 14:00 and 14:59
grep '02/Dec/2026:14:' ~/access-logs/ornek.com-ssl_log | wc -l
# Requests that returned a 5xx error in the same hour
grep '02/Dec/2026:14:' ~/access-logs/ornek.com-ssl_log | awk '$9 ~ /^5/' | head -50
# Watch the log live (press Ctrl+C to exit)
tail -f ~/access-logs/ornek.com-ssl_logComparing hourly request counts shows when traffic spiked abnormally. If new lines appear on the Errors screen or in the error_log file in the same minutes as the spike, you've most likely found the source of the problem.
Recognizing signs of an attack
The following patterns in the access log indicate an attack or a vulnerability scan:
# Brute-force attempts on the WordPress login page
grep 'POST /wp-login.php' ~/access-logs/ornek.com-ssl_log | awk '{print $1}' | sort | uniq -c | sort -rn | head
# xmlrpc.php requests
grep -c 'xmlrpc.php' ~/access-logs/ornek.com-ssl_log
# Scans for sensitive files and known vulnerabilities
grep -E '\.env|\.git/|wp-config\.php\.bak|eval-stdin\.php|\.\./' ~/access-logs/ornek.com-ssl_log | head
# SQL injection attempts
grep -iE 'union.*select|information_schema' ~/access-logs/ornek.com-ssl_log | headIf most of these requests end in a 403 or 404, the attack failed. What should worry you is a suspicious request answered with a 200, or a POST request to a PHP file you don't expect (for example, a .php file inside wp-content/uploads); that suggests a malicious file may have been planted on your site.
What to do once you've spotted an attack
- Block repeat attacker IPs with the IP Blocker tool in cPanel.
- If you don't use it, disable access to
xmlrpc.php, and add a login attempt limit and two-factor authentication to the login page. - Block PHP execution in the uploads folder and inspect any suspicious files.
- For lasting protection, follow the guide WordPress security: 12 settings that prevent hacks.
Make reading logs a habit
Checking logs regularly, not just when something breaks, helps you catch problems before they grow. Looking at the status code breakdown and the top requesting IPs once a week takes only a few minutes. Keeping log archiving turned on means you'll have evidence on hand when you need to investigate a past attack or traffic drop.
Choose a plan that makes reviewing logs easy
Sunucu Atlas's business hosting plans include access and error logs as a plan feature. For companies managing multiple sites and many email accounts from a single panel, generous NVMe storage and a high CPU limit also make it easy to keep log archives. If you're starting with a single site, the web hosting plans with the LiteSpeed web server are a good place to start; if you need access and error logs, take a look at the SA-CP-5 plan, which lists this feature. If you see an entry in your logs you can't make sense of, open a support ticket for help.
Frequently asked questions
Where are cPanel error logs located?
Web server errors appear in cPanel under Metrics > Errors. PHP errors are written to an error_log file in the directory where the error occurred; you can open it with File Manager or FTP.
What's the difference between the Raw Access log and the Visitors screen?
Raw Access gives you every request to the server in a complete, raw, downloadable file. The Visitors screen is a more condensed view that shows recent visits as a table in your browser.
Is it safe to delete the error_log file?
Yes. After reviewing and fixing the error, you can delete the error_log file; PHP recreates it when a new error occurs. A file that keeps growing is a sign of an unresolved error.
Googlebot shows up in my logs. Is it real?
User agents can be faked, so run a reverse DNS lookup on the IP address to be sure. If the returned name ends in googlebot.com or google.com and that name resolves back to the same IP, the request really came from Google.
How long are access logs kept?
The current log is processed and reset at regular intervals. To keep logs long term, turn on the option to archive logs to your home directory on the Raw Access screen; archives count toward your disk quota.