WordPress logs are located in the /wp-content/ folder of your installation. You can access them by connecting to your server via SFTP and opening the debug.log file.
If you can’t find it, you need to enable debug mode so that it is created automatically, but past errors won’t be listed in it (I’ll explain how to enable it).
Several other log files can also be consulted, although the file meant by “WordPress logs” remains the one described above.
How to enable debug mode on WordPress?
To enable debug mode on WordPress, follow these steps:
- Connect to your server via SFTP with FileZilla.
- Right-click the wp-config.php file, then click “Edit”.
- Add these lines to the file:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Link to the official WordPress documentation
Warning: if these lines already exist, don’t add the code above but simply switch the values of the first two lines from false to true
Remember to set these lines back to false once your tasks are done.
Server logs
The exact path of your server’s log file may differ, but it will generally be:
- On an Apache server, in the /var/log/apache2/ folder, the file will be named “error.log”.
- On an Nginx server, the folder will be /var/log/nginx/ with “error.log” as the file.
Checking these files is the ultimate step to diagnose a WordPress 503 error. Unlike the standard debug.log, server logs record precisely when your hosting becomes saturated and turns visitors away.
Other log files
You may need to check some very specific log files, more dedicated to security or other areas.
To do so, check the relevant plugin in its options or browse its folder via FTP.
For example, for the security plugin Wordfence lets you see the logs directly from the WordPress interface.
But stop managing your logs yourself and leave it all to Jennifer, who is used to doing WordPress site maintenance. She replies quite quickly!