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!

Stuck on this step?

Contact me and I'll help you out. I've been supporting website owners for more than 10 years now:

About the Author: Jennifer
Where to find WordPress logs?
I'm Jennifer, founder of Webooste and a freelance WordPress developer based in Marseille, France, since 2019. I hold a French state-certified diploma in web and mobile web development and have over 10 years' experience in digital. I look after the maintenance and security of WordPress websites and WooCommerce shops, 100% online, with clients worldwide. I hunt down bugs, chase away malware and take the technical worries off your mind! See my maintenance plans · Get in touch Find me on LinkedIn, Instagram, TikTok, YouTube or WhatsApp.