Title: jschinker's Replies | WordPress.org

---

# jschinker

  [  ](https://wordpress.org/support/users/jschinker/)

 *   [Profile](https://wordpress.org/support/users/jschinker/)
 *   [Topics Started](https://wordpress.org/support/users/jschinker/topics/)
 *   [Replies Created](https://wordpress.org/support/users/jschinker/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/jschinker/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/jschinker/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/jschinker/engagements/)
 *   [Favorites](https://wordpress.org/support/users/jschinker/favorites/)

 Search replies:

## Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)

 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Scripting MU blog deletion](https://wordpress.org/support/topic/scripting-mu-blog-deletion/)
 *  Thread Starter [jschinker](https://wordpress.org/support/users/jschinker/)
 * (@jschinker)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/scripting-mu-blog-deletion/#post-1688455)
 * Sorry for the late reply here. I actually cheated. In my case, all of my blogs
   are [http://hostname.org/username](http://hostname.org/username), so it was as
   simple as:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 * This is not done anywhere in WordPress itself. This is part of a much larger 
   script that deletes the user system-wide.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Automatic redirection to child site from main](https://wordpress.org/support/topic/automatic-redirection-to-child-site-from-main/)
 *  [jschinker](https://wordpress.org/support/users/jschinker/)
 * (@jschinker)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/automatic-redirection-to-child-site-from-main/#post-1821942)
 * Note that the default behavior does change in 3.2.1.
 * When a user logs in to the main site, they now get this message:
    [http://www.flickr.com/photos/63873121@N00/5997264349/in/photostream](http://www.flickr.com/photos/63873121@N00/5997264349/in/photostream)
 * The code that David posted above does work to redirect them to their dashboards,
   though. I just put it in a file in the mu-plugins folder and everything seems
   to be working like it used to now.
 * Thanks, everyone, for documenting this and making it so easy to fix.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery] [Plugin: NextGEN Gallery] Images will not upload to gallery](https://wordpress.org/support/topic/plugin-nextgen-gallery-images-will-not-upload-to-gallery/)
 *  [jschinker](https://wordpress.org/support/users/jschinker/)
 * (@jschinker)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-images-will-not-upload-to-gallery/#post-1849265)
 * I’m seeing the same thing after upgrading to 1.7.0, also on multisite 3.0.4. 
   Permissions are fine. Apache can definitely write to the directory, and it makes
   the directory for the gallery fine. Inside the gallery folder, I get an empty
   thumbs folder, but no images.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Scripting MU blog deletion](https://wordpress.org/support/topic/scripting-mu-blog-deletion/)
 *  Thread Starter [jschinker](https://wordpress.org/support/users/jschinker/)
 * (@jschinker)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/scripting-mu-blog-deletion/#post-1688328)
 * Just to follow up on this, I was in dependency hell when I was trying to call
   wpmu_delete_blog from a non-wordpress script. I ended up just setting the deleted
   flag in the wp_blogs table. That should prohibit access to the blog’s content,
   which was the main point anyway.
 * For users, I just looked up the id from wp_users based on username, and then 
   deleted that userid from the wp_users and wp_usermeta tables.
 * So far, everything seems to be working all right.
 * Thanks again for your help.
 *   Forum: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
   
   In reply to: [Scripting MU blog deletion](https://wordpress.org/support/topic/scripting-mu-blog-deletion/)
 *  Thread Starter [jschinker](https://wordpress.org/support/users/jschinker/)
 * (@jschinker)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/scripting-mu-blog-deletion/#post-1688217)
 * Yep. I would definitely not rely on the $blog_id and $user_id being the same.
   In most cases on my server, they’re not.
 * Would it be a better idea to just delete the user, and then use a separate cleanup
   script to delete all of the blogs that don’t have owners? I’m not entirely sure
   I like that, either. And, admittedly, I haven’t really looked at what happens
   to the blog when you delete its owner, so it may not even be feasible (if, for
   example, it reverts to the admin account).
 * In my case, the users log in, and I use wpdirauth to authenticate them against
   ldap. If they don’t have a blog, it creates one of the form [http://mydomain/username](http://mydomain/username).
   So when deleting, I could be able to just look up that user’s blog by the address,
   and get the correct id to remove. I don’t have any cases where they have multiple
   blogs, so it should be pretty straightforward.
 * Thanks for your help. I think I’m on the right track. I was mostly worried about
   it not working because I was calling it from outside the WP admin interface.

Viewing 5 replies - 1 through 5 (of 5 total)