A powerful membership solution for WordPress

Just recently I ran into a case where I had to quickly look something up in the database of my WordPress development environment. I typically do this via a program called Sequel Pro, which helps give some visualization to your database. I love Command Line tools, but sometimes I prefer the visuals to do some troubleshooting.

If you’ve ever looked at a WordPress database, you’ll typically see tables like wp_posts, wp_postameta, and wp_options. In multisite however, things like the posts table, postmeta and options are in tables that contain the blog_id, giving us wp_3_posts, wp_3_postmeta, and wp_3_options. No problem at all if your multisite only has a couple sites setup, but when you use it for your development environment, you get something like this:

Screen Shot 2015-02-20 at 11.32.51 AM

Determining what blog ID you are looking at, isn’t quite easy. So here’s a quick snippet that will drop the current blog ID in the admin header, like so:

Screen Shot 2015-02-20 at 11.35.06 AM

Post Promoter Pro

Posted by Chris Klosowski

Hi, I'm Chris Klosowski. Currently I am a Lead Developer of Easy Digital Downloads, where we build the easiest way to sell digital products with WordPress.

I am also the person behind Post Promoter Pro, the most effective way to promote your WordPress Content.

One Comment

  1. […] In addition to all the default items that show up in a Network Install I’ve got items added by Query Monitor, Airplane Mode, Debug Bar, Plugin Toggle, and my own Blog ID item. […]

    Reply

Leave a Reply to Code Snippet: Clean up your Local Development Admin Bar | Kung Fu Grep Cancel reply

Your email address will not be published. Required fields are marked *