{"id":1561,"date":"2022-07-13T23:25:54","date_gmt":"2022-07-13T23:25:54","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=1561"},"modified":"2026-06-05T03:38:10","modified_gmt":"2026-06-05T03:38:10","slug":"log-rotation-on-cpanel-servers","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/","title":{"rendered":"Log Rotation on cPanel Servers"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Log rotation is an essential maintenance task on hosting servers that helps manage log file sizes and prevents logs from consuming excessive disk space. On cPanel servers, log rotation is handled by different services depending on the type of log being managed.<\/p>\n\n\n\n<p>This guide explains how log rotation works on cPanel servers and where the relevant configurations can be found.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Root access to the server<\/li>\n\n\n\n<li>Access to WHM<\/li>\n\n\n\n<li>Basic knowledge of Linux log management<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">cpanellogd Managed Log Rotation<\/h3>\n\n\n\n<p>Some cPanel-specific logs are rotated by the <strong>cpanellogd<\/strong> daemon.<\/p>\n\n\n\n<p>The logs located under the following directory are managed by cpanellogd:<\/p>\n\n\n\n<p>\/usr\/local\/cpanel\/logs<\/p>\n\n\n\n<p>You can enable or disable log rotation for these logs through WHM:<\/p>\n\n\n\n<p>Home \u2192 Service Configuration \u2192 cPanel Log Rotation Configuration<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">cPanel-Specific logrotate Configurations<\/h3>\n\n\n\n<p>Some cPanel-related services, such as PHP-FPM and suPHP, use the Linux <strong>logrotate<\/strong> utility for log rotation.<\/p>\n\n\n\n<p>The configuration files for these services are maintained by cPanel and are located in:<\/p>\n\n\n\n<p>\/etc\/logrotate.d\/<\/p>\n\n\n\n<p>These configurations are automatically managed by cPanel and generally do not require manual modification.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Custom Log Rotation<\/h3>\n\n\n\n<p>If new or custom logs are created on the server, they will require their own logrotate configuration.<\/p>\n\n\n\n<p>Creating and maintaining custom log rotation configurations is typically a system administration task and may require assistance from a qualified administrator.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">All Other Log Rotation<\/h3>\n\n\n\n<p><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">The logrotate utility manages all other\u00a0<strong>logs on the<\/strong>\u00a0server<\/span>.<\/p>\n\n\n\n<p>Their configurations can be found in either:<\/p>\n\n\n\n<p>\/etc\/logrotate.conf<\/p>\n\n\n\n<p>or<\/p>\n\n\n\n<p>\/etc\/logrotate.d\/<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Viewing the logrotate Manual<\/h3>\n\n\n\n<p>If you need to create a new log rotation configuration for a custom log file, you can review the logrotate documentation using:<\/p>\n\n\n\n<p>man logrotate<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Creating a Custom Configuration<\/h3>\n\n\n\n<p>One of the easiest ways to create a custom log rotation configuration is to copy an existing configuration file and modify it to match the path and requirements of the new log file.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Scheduled Log Rotation<\/h3>\n\n\n\n<p>The logrotate utility uses <strong>anacron<\/strong> to schedule log rotations.<\/p>\n\n\n\n<p>Configured log rotation jobs are executed through:<\/p>\n\n\n\n<p>\/etc\/cron.daily\/logrotate<\/p>\n\n\n\n<p>The next scheduled run will process any newly added log rotation configurations.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Log rotation on cPanel servers is managed through both the <strong>cpanellogd<\/strong> daemon and the Linux <strong>logrotate<\/strong> utility. Understanding where these configurations are stored and how they operate helps ensure that log files remain manageable and do not consume excessive server resources.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Log rotation is an essential maintenance task on hosting servers that helps manage log file sizes and prevents logs from consuming excessive disk space. On cPanel servers, log rotation is handled by different services depending on the type of log being managed. This guide explains how log rotation works on cPanel servers and where ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[33],"tags":[5],"class_list":["post-1561","post","type-post","status-publish","format-standard","hentry","category-whm","tag-cpanel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction Log rotation is an essential maintenance task on hosting servers that helps manage log file sizes and prevents logs from consuming excessive disk space. On cPanel servers, log rotation is handled by different services depending on the type of log being managed. This guide explains how log rotation works on cPanel servers and where ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-13T23:25:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-05T03:38:10+00:00\" \/>\n<meta name=\"author\" content=\"vijender\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"vijender\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/\"},\"author\":{\"name\":\"vijender\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\"},\"headline\":\"Log Rotation on cPanel Servers\",\"datePublished\":\"2022-07-13T23:25:54+00:00\",\"dateModified\":\"2026-06-05T03:38:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/\"},\"wordCount\":390,\"commentCount\":0,\"keywords\":[\"cPanel\"],\"articleSection\":[\"WHM\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/\",\"name\":\"Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"datePublished\":\"2022-07-13T23:25:54+00:00\",\"dateModified\":\"2026-06-05T03:38:10+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/13\\\/log-rotation-on-cpanel-servers\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Log Rotation on cPanel Servers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\",\"name\":\"PheonixSolutions Knowledge-Base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\",\"name\":\"vijender\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"caption\":\"vijender\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/author\\\/vijender\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/","og_locale":"en_US","og_type":"article","og_title":"Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base","og_description":"Introduction Log rotation is an essential maintenance task on hosting servers that helps manage log file sizes and prevents logs from consuming excessive disk space. On cPanel servers, log rotation is handled by different services depending on the type of log being managed. This guide explains how log rotation works on cPanel servers and where ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2022-07-13T23:25:54+00:00","article_modified_time":"2026-06-05T03:38:10+00:00","author":"vijender","twitter_card":"summary_large_image","twitter_misc":{"Written by":"vijender","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/"},"author":{"name":"vijender","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d"},"headline":"Log Rotation on cPanel Servers","datePublished":"2022-07-13T23:25:54+00:00","dateModified":"2026-06-05T03:38:10+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/"},"wordCount":390,"commentCount":0,"keywords":["cPanel"],"articleSection":["WHM"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/","name":"Log Rotation on cPanel Servers - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"datePublished":"2022-07-13T23:25:54+00:00","dateModified":"2026-06-05T03:38:10+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/13\/log-rotation-on-cpanel-servers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Log Rotation on cPanel Servers"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/","name":"PheonixSolutions Knowledge-Base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d","name":"vijender","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","caption":"vijender"},"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/author\/vijender\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1561","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=1561"}],"version-history":[{"count":3,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1561\/revisions"}],"predecessor-version":[{"id":3748,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1561\/revisions\/3748"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=1561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=1561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=1561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}