Categories: cPanel

How to Clear cPanel Server logs ?

You can empty cPanel servers logs by using following commands

Login into server as root

root@server[#]vi logs

echo > /usr/local/apache/logs/error_log
echo > /usr/local/apache/logs/access_log
echo > /usr/local/apache/logs/access_log
echo > /usr/local/apache/logs/error_log
echo > /usr/local/cpanel/logs/access_log
echo > /usr/local/cpanel/logs/error_log
echo > /var/log/exim_mainlog
echo > /var/log/exim_rejectlog
echo > /var/log/maillog
echo > /var/log/messages
echo > /var/log/messages.1
echo > /var/log/maillog.1

:wq!

root@server[#]chmod 755 logs

root@server[#]./logs

It will empty all logs present on your server.

Thanks


Vishwajit Kale
Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostripples, a company that aims to provide affordable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.

Recent Posts

Website Affirmations for 2026: Build, Grow, and Succeed Online

With 2026 just days away, it’s time to reimagine your website’s future. Hostripples encourages businesses, creators, and entrepreneurs to begin…

1 week ago

Cron Jobs: Automate Everything While You Sleep

Cron Jobs – The Unsung Heroes Think of cron jobs as the unsung heroes of your server — capes optional,…

2 weeks ago

Designing a Christmas Website: Creative Ideas & Best Practices

With vibrant colors, cheerful graphics, and a sprinkle of festive magic, your website can instantly create an emotional connection and…

3 weeks ago

Meet Sora: The Game-Changing AI Video Model from ChatGPT

The world of artificial intelligence is evolving faster than ever — and one of the biggest breakthroughs is here. Sora,…

4 weeks ago

How to Design a Website for Black Friday 2025 (Complete Guide)

Black Friday 2025 is here — the biggest shopping moment of the year, where customers expect unbeatable prices, fast performance,…

1 month ago