Every request that touches your website gets written down somewhere. Who asked for which page, from what address, at what second, and whether the server said yes. Most owners never open these files — which is a shame, because your logs usually record a break-in attempt days before anything visibly breaks.
What your logs actually record
Two files matter. The access log lists every request: IP address, timestamp, URL, response code, and the browser string the visitor claimed. The error log records what went wrong — missing files, crashed scripts, permission failures. On shared hosting you'll find both in cPanel under Metrics, usually labeled Raw Access and Errors; on WordPress hosts they often sit in a folder called logs next to your site files.
The pattern that matters most: failed logins
A normal customer mistypes a password once or twice. An attack looks different: dozens or hundreds of requests to your login URL from one address, seconds apart, each answered with a failure code. Another giveaway is one IP trying many different usernames — a real person owns one account, not forty. If you see POST requests to wp-login.php or /admin arriving every few seconds, that's not a forgetful customer.
What error logs whisper before a breach
Repeated 404s for files like xmlrpc.php, .env, backup.zip, or old plugin paths mean a scanner is mapping your site for known weaknesses. A sudden burst of PHP errors from a file you don't recognize can mean injected code is misfiring. Neither proves compromise — but both are worth ten minutes of attention.
How long to keep them
Many hosts rotate logs after seven days, and breaches are routinely discovered weeks after they start. If your host allows it, extend retention to 90 days or download archives monthly. When you do need to reconstruct what happened, the log from six weeks ago is the difference between an answer and a guess.
When to actually look
You don't need to read logs daily. Skim them after any password reset you didn't request, after a traffic spike with no marketing cause, after your host emails about resource overages, and before you close out any suspected incident. Fifteen minutes a month of scanning for the patterns above beats months of not knowing.
Reading logs by hand doesn't scale, and attackers don't wait for your monthly check. Trust Guard's monitoring watches your site continuously and flags suspicious changes the day they happen — so the diary gets read even when you're busy running the store.
Comments
No comments yet. Be the first to share your thoughts!