Tag Archives: Wordpress Mu

I recently implemented a way to limit access by IP range on specific blogs on WordPress MU. As you know, WordPress MU uses Apache Rewrite engine to rewrite URLs. For instance, you have a blog on WordPress MU called “intranet”. Apache Rewrite takes the “intranet” string in the URL and automatically rewrites it as a value in the PHP script. A side effect to Apache Rewrite is that “Directory” .htaccess parameters don’t work. So, if you wanted only your company IPs to access an internal blog, you will need to use Apache Rewrite parameters instead.

Here’s how to limit access to an IP or subnet on a particular blog on your WordPress MU install:

DO NOT SAVE YET. You will need edit the IP address info and blog info first:

Step 2: Replace the 1.2.3.4 number with your company IPs (its easier if you have an entire subnet or you can use internal IPs)

For a class C, the part after {REMOTE ADDR} would be
!^1\.2\3\.

Step 3: Replace BLOG1 with the blog you want to limit access to those IPs. So http://www.mysite.com/myfirstblog would be “^/blogs/

Optional: If you have WordPressMU installed in a folder (e.g. not your root folder), you will need to append the directory in front of the blog name.

For instance, if you have http://mysite.com/blog (as your WordPress MU root folder) the ^/ BLOG1 would be

^/blog/BLOG1

Optional: Multiple blogs with same access restrictions
By default, the Apache Rewrite treats every line as an AND statement. If you have multiple blogs, you will need to have an [OR] at the end of the line.

Share this:

I attended WordCamp SF for the first time in 2009. There was some exciting news at the camp, especially with the news that WordPress MU functionality is going to get integrated with WordPress. This will be nice considering updates for WordPress MU are usually a month or so behind. What will this mean? Hopefully, it will bring a larger community in maintaining and adding new plugins for WordPress (MU). The question will be whether it will be easy to convert an existing WordPress MU install over to the new WordPress. (Possibly WordPress 3.0?)

Highlights of the conference:
Timothy Ferriss, nominated as one of Fast Company’s “Most Innovative Business People of 2007,” is an angel investor and author of the #1 New York Times, Wall Street Journal, and BusinessWeek bestseller, The 4-Hour Workweek, which has been sold into 35 languages. He had a lot of good points on tweaking blogs to reach a larger audience.

WordPress gear! I plan on sending out some stickers and buttons I got at the conference.. stay tuned.

BuddyPress There’s a lot of potential with the community aspect of blogs. I’m hoping this functionality will be integrated with WordPress MU.

Share this:

I have found a really useful plugin in WordPress MU for making a blog private. Sometimes, committees need a way to share information away from home and they don’t want everything posted to be known by the world. Rather than using the “Password protect post” option, there is a way to only allow registered users that are members of the blog to view the post.

This plugin adds functionality:
3) I would like my blog to be visible only to registered users from blog community
4) I would like my blog to be visible to registered members of this blog5) I would like my blog to be visible only to administrators

To install:
1) Download the plugin file.
2) Copy the plugin file to the plugin folder in WordPress MU
3) In the Plugin interface in WordPress MU, activate the “More Privacy Options” Plugin
4) In the Privacy option of the blog (under Settings -> Privacy) you will have the additional privacy options. Select the “I would like my blog to be visible to registered members of this blog
I would like my blog to be visible to registered members of this blog” option.
5) Note: AFAIK, this is on a site by site basis, so will need to enable this plugin for each blog you want to add it to.

Update 4/28/2010:
If you upgrade WordPress MU to a newer version, you will need to set the “Privacy Settings” again. Occasionally, the WordPress upgrade will reset the privacy settings back to default.