vanillaxtrakt
Member
Posted 15 years ago #
I'm writing a WPMU plugin to get rid of old/unused blogs. It's nothing fancy. It just exports and/or deletes blogs en masse. The problem is I'm deleting 1800 blogs. My code does the job fine, but I was wondering if there was something built-in to WPMU so I can show the status of the deletion process. It takes so long that the page times out before it's done. The blogs still get deleted, but I need to have a way to show an updated status of the process while I'm deleting them.
This is my first foray into PHP, and it doesn't seem too bad. I've done a bunch of research and it looks like PHP can't really do this on its own and I'll need Javascript. That's where I get really lost. I know these aren't Javascript forums but I thought I'd check and see if anyone knew a quick way to do this using what already comes with WPMU before I go spending time creating something from scratch.
Nope, nothing built in MU for that.
Count the blogs as you delete them, break after 100, display a message on the screen.
The Dashboard -> Site Admin -> Upgrades page does this. I don;t have an open install handy to check the file name though.
"The Dashboard -> Site Admin -> Upgrades page does this."
You mean as an example to look at to see how they did it, not as something to hook into. :)
/clarification
Actually the upgrade blog process is hookable I believe. You probably could hook into it and setup a method of deleting.
Actually I stand corrected. A quick look at the trac doesn't show a hook on the upgrade process. At least I can't find one. Have to admit that I'm very surprised actually.
It is a decent example of the break down into subpages and do something method though.
Page is here: http://trac.mu.wordpress.org/browser/trunk/wp-admin/wpmu-upgrade-site.php
I'm kind of slammed with a security issue today so I can't look into this.