Drupal: Keep your User-Table lean

If you have a high-traffic Drupal website you probably already know the importance of keeping your database lean and clean. I’ve already posted a few easy ways to make Drupal run faster, but one thing I did not mention in that post was Drupal User table maintenance.

One side-effect of having a popular membership website is that you will get a lot of people that create an account, browse around and then never return. In an ideal world those members would keep coming back every day, but in reality it just does not work this way.. At GrownUpGeek.com we get around 200 new user sign-ups each day but roughly 25% (just an estimate off the top of my head) never return. If I left all these inactive accounts in the database it would quickly swell out of control, potentially slowing down user-login times. Also, I hate having a bloated database that’s just wasting space.

How to keep your Drupal user-table clean and tidy:

Remove bogus accounts as they are created: I configure the server to send all bounced emails to me. If a user signs up with a bogus email address I delete the account right then and there. Many of these bounced emails are due to simple typos in the domain-name so I can fix it, resend the account-validation email and potentially have a new member that would have never be validated. (this only works if you are using user-validation emails)

Use the Inactive User module:The inactive_user module provides Drupal administrators with a way to automatically manage inactive user accounts. This module has two goals: to help keep users coming back to your site by reminding them when they’ve been away for a configurable period of time, and to cleanup unused accounts.” This module is a must-have if you have a high-traffic Drupal website. You can download inactive_user HERE.

Using these two methods I am able to keep the user-table clean and tidy with a minimum amount of time and effort.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>