WPMU Cleanup – script to delete unused blogs

WPMU Cleanup is a script that checks the WordPress-MU database for blogs that have not been updated for some time. Then, it sends to these blogs authors an email telling them that their blog will be deleted in a few days if they don’t update it. If the blog is not updated in time it it removed from the system.

Here are the instructions:

This script checks the WPMU database for blogs that have not been updated for X days, then sends a notice to the blogowner that the blog will be deleted after Y days.

It also automatically deletes blogs that have not been updated for Y days, then sends an email to the blog owner.

On both occasions, the script will send a report with details on warned and deleted blogs to the administrator.

This script has *NOT* been programmed as a plugin since it is intended to be executed by a cronjob. As it is now it should be run once every 7 days, but you can configure it to do otherwise.

This script is *NOT* a final version and should be used with caution and only if you know what you are doing. I recommend testing it on a testsite rather than a livesite.


Did you find this post interesting? Please subscribe to my feed.

Comments 4

  1. IndieLab wrote:

    Sounds like a great addition to a WPMU Admin’s productivity arsenal. I’m not there yet as I only have a few blogs, but when it comes time to clean up, I’m very happy to know that this exists.

    Thank you!

    Posted 11 Jun 2008 at 4:16 pm
  2. Michael wrote:

    Any chance this could be modified to have an option to archive rather than delete a blog? We’re very interested in bringing this script into our MU installation. Thanks!

    Posted 30 Jun 2008 at 7:16 pm
  3. Elad wrote:

    Looking at the code it seems to be a major change.

    Posted 30 Jun 2008 at 7:36 pm
  4. Boris wrote:

    Thanks for the script Elad! I made a couple of modifications and posted a version at http://www.borism.net/2008/12/31/deleting-inactive-wordpressmu-blogs/

    Take care and happy new year!
    - Boris

    Posted 31 Dec 2008 at 9:10 pm

Post a Comment

Your email is never published nor shared. Required fields are marked *