Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to view access logs and WordPress error logs

Logs are written records of what happened on your site. This guide shows where to find them and how to read them.

WordPress2 min read10 steps5 screenshots

What are logs?

A log is a diary kept by your server. Each line records one event with a time. There are two main types:

  • Access logs list every visit. They show who asked for which page and whether it worked.
  • Error logs list problems. They help you find why a page broke.

WordPress can also keep its own error log, called the debug log.

Screenshot: WordPress can also keep its own error log, called the debug log.

Way 1: Your control panel

Many control panels have log tools. Look for names like Raw Access, Metrics or Errors. The names vary by panel.

  1. Log in to the client area.
  2. Open your hosting service and go to your control panel.
  3. Look for Errors to see the latest error lines.
    Screenshot: Look for Errors to see the latest error lines.
  4. Look for Raw Access or a similar page to download access logs.
  5. Open the downloaded file with a text editor. Some files are compressed, so unzip them first.

Way 2: The WordPress debug log

Warning: Take a backup of wp-config.php before you edit it.
  1. Open File Manager and edit wp-config.php.
    Screenshot: Open File Manager and edit wp-config.php .
  2. Find WP_DEBUG and replace it with the lines below.
    Screenshot: Find WP_DEBUG and replace it with the lines below.
  3. Save the file.
  4. Visit the page that has the problem.
  5. Open wp-content/debug.log in File Manager.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

These lines turn on debugging, save errors to a file, and keep them hidden from visitors. Turn debugging off again when you finish. The log can grow large and may show private details.

Way 3: SSH

With SSH you can read logs from the command line. SSH is a safe way to type commands on your server. The log paths differ between servers, so check with Hostvento support. To see the end of a file, use:

tail -n 50 wp-content/debug.log

This shows the last 50 lines of the debug log.

tail -f wp-content/debug.log

This keeps the file open and prints new lines as they appear. Press Ctrl+C to stop.

How to read a line

An error line usually has a time, the type (such as Fatal error or Warning), a message and a file path. The file path tells you which plugin or theme caused it. A fatal error stops the page. A warning is smaller and often does not break the page.

Tip: Paste the error line into a support ticket. Open one here if you need help.

Quick recap

  • Access logs show visits. Error logs show problems.
  • Find them in your control panel.
  • Turn on WP_DEBUG_LOG for a WordPress log.
    Screenshot: Turn on WP_DEBUG_LOG for a WordPress log.
  • The file path in an error names the cause.