Many times we need to remove the category or blog slug from wordpress URL.  We can very easily remove the blog word from wordpress blog URL. In this tutorial, We are going to show remove blog word from wordpress permalink url. this is useful when you upgraded your wordpress multisite installation.

remove blog word from wordpress permalink url

I personally used wordpress mu for long time. When wordpress 3.0 launched with multisite functionality we started using wordpress 3.0. Removing blog and category slug is very important for many clients.

I am assuming you are using wordpress 3.0 multisite installation. If that is so then you need to do following action.

First login to wordpress admin and go to Super Admin > Sites > Edit

and Scroll down to “Permalink Structure” and remove the “/blog” part. That should work.

Image is shown as like.

remove blog word from wordpress permalink url

remove blog word from wordpress permalink url

than update the option and your issue will be solved. If you are still facing issue then you need to use following code in your functions.php file. Following code is useful for those who updated wordpress mu from wordpress 3.0, other wise they can use above action.


/* just check if the current structure begins with /blog/ remove that and return the stripped structure */
function remove_blog_slug($tag_cat_permalink){

return $tag_cat_permalink;

$new_permalink=preg_replace ("/^\/blog\//","/",$tag_cat_permalink );
return $new_permalink;


If you want advanced permalinks then I can suggest following wordpress plugin for changing the permalink

Advanced Permalinks

advanced permalink options that allow you to:

  • Have multiple permalink structures. Permalinks can be assigned to posts or ranges of posts
  • 301 redirect old permalink structures (many structures are allowed)
  • Category-specific permalinks. Posts in certain categories can be assigned a permalink structure
  • No need to have a base to the category permalink!
  • Change author permalinks
  • Enable periods in permalinks – perfect for migrating old websites

If you need more information or help then you can contact me through contact form.

Written by Purab Kharat

My name is Purab Kharat, Here is my Personal Blog: Work as an Senior Technical Lead at Smartsourcing Global Pvt Ltd in Princeton, NJ, USA. I contributor of many wordpress plugins and Drupal Modules. I am core developer of Drupal. Connect to on LinkedIn or Follow @purab on Twitter or Follow me on Google+ or Write Mail to or Chat with me on Skype : purabdk

This article has 10 comments

  1. jaffa Reply

    This didnt work for me, I know get 404 errors for all posts.

    I followed your instructions carefully. Can you help please?

  2. Paul Reply

    Thanks!! Problem solved!
    “Super Admin > Sites > Edit” did not work.

    But your php snippet did it.

  3. Leo Reply

    Thank you, Purab!
    I spent several hours trying to remove the blog slug and nothing worked. I found your beautiful code and it works like a charm. You are a star!

Leave a Comment

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