How to find and clear all website error logs on a Plesk (Linux) shared hosting server?

There are times when you need to find and clear up PHP / WordPress error logs for multiple sites on the same server at once, so you can quickly oversee recurring problems. Running these Linux commands is one of the solutions which could come in handy in such cases.

First you must login into the server via SSH with root privileges.

To find all of the error log files and list them in the console…

Use this command:

To find all of the error log files and empty them…

This will just empty the error log files. They will be left on the system. Use this command:

About the author
I'm a full-stack WordPress developer with a 10+ years of solid experience in the core web development languages, development processes / techniques, web security, Linux server management and with pretty good understanding about proper semantics, UX/UI, technical SEO, good design and basic knowledge of company leadership. On top of that - a distant 5+ years experience as a computer and electronics repair technician which often enables me to understand also how the things work at the hardware level.