Tag Archives

2 Articles
Fixing WordPress Network Admin on 3.1.x

Fixing WordPress Network Admin on 3.1.x

Having upgraded from WPMU, there were problems since our blog, MHS Blog and Staff Blog, jumped to 3.x series. The biggest problem is when we jumped into 3.1. The Network Admin is no longer accessible. It always redirects us to “/wp-admin/network/” not “/admin/wp-admin/network/” even when we tried to set the address manually.

A temporary fix was to set “PATH_CURRENT_SITE” from “/” to “/admin/”. That could only enabling the Network Admin. But, all of the other user blogs became unaccessible.  So, I have to set back and forth just to switch to maintenance mode or operational.

The real solution however is to set your admin blog (usually blog id “1”) to “/”. Apparently, the problem was because the Network Admin section searched for “/” path. While, we the relic from WPMU uses “/admin/” path in our main blog.

So, in wp_blogs  table, we change the path of blogid 1 from “/admin/” to “/”. It works.

Btw, thx char101 for the solution. 🙂

Configuring Basic Network (2 of 2)

Configuring Basic Network (2 of 2)

Now, you could pinged the network router, yet, you couldn’t access

google.com
. It’s because the way internet runs is by using IP, not names. So, when you type google.com, actually your system is trying to translate it into IP.

There are two ways of setting it.

#1 Using

/etc/hosts

This is an ARPANET legacy and still holds true. Although nowadays we are using DNS, but this file still can be used to point in some site. This is what it looks like:

127.0.0.1 localhost rajagukguk-laptop

It binds IP 127.0.0.1 to localhost and rajagukguk-laptop. So, when you type localhost, you would be directed into 127.0.0.1

#2 Using DNS

There are ways to set DNS, but the default standard is using

/etc/resolv.conf
. Here’s my
/etc/resolv.conf
:

nameserver 152.118.24.2
search ui.ac.id

The first line is the DNS server that we would be using to query IP. The second line is about our home network name. So, when we type http://www/ the address will be rewritten as http://www.ui.ac.id/, or if we enter “webmail”, then it would be rewritten as webmail.ui.ac.id. Neat, eh?

Now, here’s some bonuses tips.

1 If you are a web developer

When we entered an address, the system will looked into /etc/hosts first then your DNS. So, you could set your own version of something.com before you published it with real IP. For example, smartcard.ui.ac.id is situated on 152.118.24.116. But, we are going to pimp that one out. Instead of pimp it online and pissed people, I could set another box in 192.168.1.68 and then set my development PC to point into that address. So, in order to do that, I add my web development PC’s /etc/hosts as following line:

192.168.1.68 smartcard.ui.ac.id smartcard

So, everytime I access http://smartcard.ui.ac.id/ from my browser in that computer, it would go into 192.168.1.68 instead of the real one.

2 You are an anti-ad

WARNING: I don’t recommend this, because ad is something that some people lived from. But, sometimes a site is awfully slow because of these ad sites keeps pushing bad javascript.

[Gah! This is left as an excercise for the reader. HINT: Point them to localhost]