Viewing Access and WordPress Error logs
When diagnosing and debugging issues on your WordPress sites, logs can be really useful. It’s easy to see your access and WordPress error logs. Simply follow the steps outlined below.
How to View Access and WordPress Error Logs
You can view your access and WordPress error logs in two ways: through the MyKinsta dashboard and by downloading the raw log files.
MyKinsta dashboard (option 1)
Option 2: View WordPress logs in their raw form
Option 3 – In MyKinsta, enable Debug Mode.
Option 4 – In the wp-config.php file, enable error logging.
MyKinsta Dashboard is the first option.
We’re thrilled to announce that your logs are now available in the MyKinsta dashboard. This is a quick way to debug anything without having to use an FTP client or the command line.
Simply go to one of your WordPress sites and click “Error Logs” on the right-hand side. Your error.log, kinda-cache-perf.log, and access.log files can all be viewed. It will display the last 1,000 lines by default (timestamps are displayed in UTC). You may see the last 20,000 lines by dragging the slider over.
WordPress cache log access.log file WordPress cache log
Log of WordPress access
Option 2: FTP access to raw access and WordPress error logs
The raw log files can be downloaded as a second option for viewing your logs. To begin, you’ll need to connect to your site using SFTP. Then look at the root for a folder called “logs.”
sftp error logs for WordPress
Your access logs, WordPress problem logs, and Kinsta cache logs are all stored in this folder.
logs wordpress access.log error.log kinsta-cache-perf.log
Do you want to discover how we grew our traffic by over 1000%?
Join the 20,000+ people who receive our weekly email with WordPress insider secrets!
Now is the time to subscribe.
For older log archives, Gzip (.gz) backups are made automatically. Additional debugging information in WordPress can be found in the codex.
Option 3 – In MyKinsta, enable Debug Mode.
WordPress debug mode may be activated right in the MyKinsta dashboard for Kinsta users. Simply go to Sites > Tools > WordPress Debugging and select “Enable” from the drop-down menu. This allows you to see PHP errors and alerts without needing to use SSH or SFTP to enable debug mode.
In MyKinsta, I enabled debug mode.
Option 4 – In the wp-config.Php file, enable error logging.
To examine your WordPress error logs, you must enable them in your wp-config.php file. To begin, you’ll need to connect to your site using SFTP. Then you can edit your wp-config.php file by downloading it. Always make a backup of this file before proceeding!
Save the wp-config.php file to your computer.
Find the line that says /* That’s it, don’t touch anything else! * Have fun with your blogging. / Add the following (as seen below) directly before it:
define(‘WP DEBUG’, true); define(‘WP DEBUG’, true); define(‘WP DE
WP DEBUG \sWP DEBUG
If the preceding code already exists but is set to “false” in your wp-config.php file, simply modify it to “true.” Debug mode will now be enabled. If there are any warnings or errors, you’ll notice them in your WordPress admin.
By adding the following code just after the WP DEBUG line (as shown below), you can make the debug log report all errors to a file:
define(‘WP DEBUG LOG’, true); define(‘WP DEBUG LOG’, true); define(‘WP DE
WP DEBUG LOG
Re-upload this to your server after saving your changes. The faults will then be logged in your /wp-content/ folder’s debug.log file. If you don’t see this file for some reason, you can always make one.
Important: If WP DEBUG is enabled in your Kinsta environment, all errors will be routed to the debug.log file instead of the error.
Go to the MyKinsta dashboard and log in.
Save time, money, and improve site performance by using:
Expert WordPress hosting assistance is available 24 hours a day, 7 days a week.
Integration with Cloudflare Enterprise.
With 29 data centers across the world, we can reach a global audience.
With our built-in Application Performance Monitoring, you can improve your performance.
All of this and more is included in a single plan that includes no long-term obligations, aided migrations, and a 30-day money-back guarantee. Check out our plans or speak with a sales representative to find the ideal plan for you.