How Do I View My Access and WordPress Error Logs?


Logs can be very helpful when troubleshooting and debugging issues on your WordPress sites. Viewing your access and WordPress error logs is pretty simple. Just follow the instructions below.

How to View Access and WordPress Error Logs

There are a couple of different ways to view your access and WordPress error logs, one is via the MyKinsta dashboard, and the other is simply downloading the raw log files.

Option 1 – MyKinsta Dashboard

We are excited that you can now access your logs in the MyKinsta dashboard. This is a fast way to quickly debug something without having to spin up your FTP client or command line.

Simply click into one of your WordPress sites and on the right-hand side click on “Error Logs.” You can view your error.log, kinsta-cache-perf.log, and access.log files. By default, it will show the last 1,000 lines (timestamps are displayed in UTC). You can drag the slider across to see the last 20,000 lines.

error.log file

error.log file

kinsta-cache-perf.log file

WordPress cache log
WordPress cache log

access.log file

WordPress access log
WordPress access log

Option 2 – View Raw Access and WordPress Error Logs via FTP

The second way to view your logs is simply downloading the raw log files. First, you will want to connect to your site via SFTP. Then in the root, you will see a folder called “logs”.

wordpress error logs folder sftp

Within the folder are your access logs, WordPress error logs, and also your Kinsta cache logs.

  • access.log
  • error.log
  • kinsta-cache-perf.log

logs wordpress

Gzip (.gz) backups are automatically created for older logs archives. You can see the codex for additional debugging information in WordPress.

Option 3 – Enable Debug Mode in MyKinsta

For Kinsta users, WordPress debug mode can be enabled right in the MyKinsta dashboard. Simply navigate to Sites > Tools > WordPress Debugging, and click the “Enable” button. This will allow you to see PHP errors and notices without having to enable debug mode via SSH or SFTP.

Enabled debug mode in MyKinsta.
Enabled debug mode in MyKinsta.

Option 4 – Enable Error Logs in wp-config.php File

Your final option to view your WordPress error logs is to enable them in your wp-config.php file. First, you will want to connect to your site via SFTP. Then download your wp-config.php so you can edit it. Note: Always make a backup of this file first!

Download wp-config.php file
Download wp-config.php file

Find the line that says /* That's all, stop editing! Happy blogging. */ and just before it, add the following (as seen below):

define( 'WP_DEBUG', true );
WP_DEBUG
WP_DEBUG

If the above code already exists in your wp-config.php file but is set to “false,” simply change it to “true.” This will enable debug mode. Note: You will also see warnings or error in your WordPress admin if they exist.

You can then enable the debug log to send all errors to a file by adding the following code just after the WP_DEBUG line (as seen below):

define( 'WP_DEBUG_LOG', true );
WP_DEBUG_LOG
WP_DEBUG_LOG

Save your changes and re-upload this to your server. The errors will then get logged to the debug.log file within your /wp-content/ folder. If for some reason you don’t see this file, you can always create one.

Important: If you have WP_DEBUG enabled in the Kinsta environment, all errors will be routed to the debug.log file and nothing would go to the error.log in the MyKinsta dashboard.


Save time, costs and maximize site performance with:

  • Instant help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • Global audience reach with 35 data centers worldwide.
  • Optimization with our built-in Application Performance Monitoring.

All of that and much more, in one plan with no long-term contracts, assisted migrations, and a 30-day-money-back-guarantee. Check out our plans or talk to sales to find the plan that’s right for you.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Contact
San Vito Al Tagliamento 33078
Pordenone Italy
Item added to cart.
0 items - 0.00
Open chat
Scan the code
Hello 👋
Can we help you?