Removing the /blog Slug in WordPress MultiSite

Wordpress LogoI ran into an interesting issue at work today. We’re setting up a company blog using WordPress and we’re using the multisite functionality to manage how different sections of the blog work. This may not be the most efficient way to do it, but in the corporate world, you want to make sure that the right people have the right access to the right sections so everyone can work in their own happy little space.

Everything was working fine until we started setting up permalinks according to the instructions provided by our SEO expert. The issue we ran into was that WordPress automatically adds a /blog slug in front of the permalinks. My understanding is that this slug is to avoid conflicts between permalinked categories on the main site and sub-sites that may have the same name. That makes sense. At the same time, though, there should be a clearly explained way to change this in the network admin section of the site.

Since this capability is noticeably absent, I had to take to researching the solution. After browsing several bug reports and forums that discussed the issue from as far back as 2009, I finally found “How To Remove The /blog/ slug From The Permalinks(URL) in WordPress Multisite Installation Without A Plugin” on the learn(n*share(n,learn(n+1))) blog. On this site, the process for removing the /blog/ slug is explained in its full, convoluted glory!

Basically, here are the steps, without any explanation of why.

  1. set your permalink structure for your site, under settings > permalinks for the main blog
  2. go to the list of sites in the Network Admin section and click edit on the main site
  3. under the settings tab, find and remove the /blog/ slug in three fields (Permalink Structure, Category Base & Tag Base)
  4. go back to the settings > permalinks section of the main blog, but DO NOT SAVE the page
  5. leave the page and don’t ever go there again! seriously.

That’s all there is to it, even though it doesn’t make a lot of sense. If you want to know why it works and how it works on the back end, visit the  learn(n*share(n,learn(n+1))) blog, where you’ll find a great, detailed explanation.

Comments

  1. says

    Thanks, it worked. When I went to the Permalink settings it still showed blog. I navigated away as recommended, tested it an viola’. How Stupid!!!! Thank you!

What do YOU think? Let me know...