software:wordpress:cleanlog
Differences
This shows you the differences between two versions of the page.
| software:wordpress:cleanlog [2024/04/05 17:48] – created rodolico | software:wordpress:cleanlog [2024/04/05 18:51] (current) – rodolico | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Clean WordPress Security Logs ====== | ====== Clean WordPress Security Logs ====== | ||
| - | WordPress has some big security issues which, if not managed correctly | + | WordPress has some big security issues which, if not managed correctly. We use [https:// |
| + | |||
| + | However, the logs are only stored in the database and no longer able to be cleaned automatically, | ||
| + | |||
| + | To fix this, I wrote a simple Perl script that is run weekly as a cron job, removing anything older than 4 weeks. When I ran this the first time, on a system which has just grown over the years, I removed almost 2 Gigabytes from the half dozen sites that were affected. | ||
| + | |||
| + | This script can be downloaded from our Subversion repository with the command <code bash>svn co http:// | ||
| <code perl cleanWPSecLogs> | <code perl cleanWPSecLogs> | ||
| Line 24: | Line 30: | ||
| # Description | # Description | ||
| # Script to clean up security log tables on WordPress sites | # Script to clean up security log tables on WordPress sites | ||
| - | # Some wordpress | + | # Some WordPress |
| # a certain period of time. This can cause database tables to grow without relief until they threaten to fill | # a certain period of time. This can cause database tables to grow without relief until they threaten to fill | ||
| # the database partition | # the database partition | ||
software/wordpress/cleanlog.1712357282.txt.gz · Last modified: 2024/04/05 17:48 by rodolico
