The MU forums have moved to WordPress.org

Automatically Delete Inactive Blogs (14 posts)

  1. kiwizz
    Member
    Posted 18 years ago #

    Is there a way to have WPMU clean up bloggs that havent had any activity for a month or so? I know its probably just a simple php script (wish I knew what it was). Its just a nice way to remove all those blogs people have setup to test your blogging website.

  2. andrea_r
    Moderator
    Posted 18 years ago #

    Well, the following suggestion isn't automated, but it is a feature I overlooked (what with all the menu options to pick from I got distracted).

    Along the top of the list of blogs there are headings:
    ID Blog Name Last Updated Registered

    I finally noticed they are clickable and you can sort the list by each option. *blushes* So I could quickly check on never-updated blogs without having to scan the list.

    Or maybe everyone else already saw it and I'm just revealing how dense I can be ocasionally. ;)

  3. stutley
    Member
    Posted 18 years ago #

    To delete entries in the database automatically, you would need to set up a cronjob. PHP in itself can not be automated to run scripts at say a weekly basis.

    If you do not want to delete those blogs by hand, you should either set up a cronjob or program a PHP script that will do the thing for you (and you would have to run it manually).

  4. samchng
    Member
    Posted 18 years ago #

    andrea you have been dreamy? Just pullin ya leg.

    Anyway when i sort Users under Site Admin > Blogs

    I get a SQL error.

    WordPress database error: [You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC LIMIT 0, 60' at line 3]
    SELECT * FROM wp_blogs WHERE site_id = '1' ASC LIMIT 0, 60

    Anyone has that problem?

  5. andrea_r
    Moderator
    Posted 18 years ago #

    :D Lemme check.... yep, I get the same error. Also, when I click on 'actions" All other sort-by options worked though.

  6. drmike
    Member
    Posted 18 years ago #

    I think you need an ORDER BY in there for limit to work.

  7. andrea_r
    Moderator
    Posted 18 years ago #

    Then that would be a bug in the code itself.

  8. drmike
    Member
    Posted 18 years ago #

    Agreed but wouldn't it be cool up submit the fix yourself to them? :)

  9. andrea_r
    Moderator
    Posted 18 years ago #

    Touche. :D

    (brain fuzzies today)

  10. drmike
    Member
    Posted 18 years ago #

    That's fine. I know others do like the idea of getting in there and working with the code. I'm just used to it.

    -dr(Sitting here trying to convert the phpBB Aqua theme over)mike

  11. kiwizz
    Member
    Posted 18 years ago #

    Rather than setting it up as a cron job (dont know how :) ) couldnt it be added to each admin page, or possibly the updade site (or a new page) so it would run when you accessed the page? ie, another button on the site admin page that would run the php script required to delete the inactive blogs.

  12. samchng
    Member
    Posted 18 years ago #

    Yeah! I found a buggy... Thanks for verification andrea. Anyone submitted the bug?

    Maybe we should start working on the php script first to delete inactive blogs. What say you guys?

  13. kiwizz
    Member
    Posted 18 years ago #

    Sounds good :) if only I could programme php :) I have to rely on all the nice programmers out there to do all the work - Thanks Guys ! You know who you are :)

  14. mickemus
    Member
    Posted 17 years ago #

    I logged an feature request - please second it if you agree (any additional features appreciated)!

    http://mu.wordpress.org/forums/topic.php?id=1581&replies=1#post-8907

About this Topic