Multisite and the dreaded /blog/ slug base

When dealing with sub-sites in multisite and using sub-folders, individual sites are given the following permalink structure: http://www.mydomain.com/blog/sample-post/ In some contexts this makes a lot of sense but in others the user might want to get rid of the /blog/ in the slug.

Where does this “blog” come from?

The string “blog” is hardcoded into the url structure for WordPress Multisite. This enables it to differentiate between various sites should they have the same domain name.

How can I get rid of it?

From Network admin > Sites edit the site in question and got to the settings panel. Look for Permalink structure and change /blog/%postname% to /%postname% (adjust for your permalink structure).

I’m still having problems and now my categories don’t work.

You may have another plugin that is affecting your permalinks. I have found this to be the case with Yoast SEO and others that strip the category base from categories. In the case of Yoast SEO: Under SEO Permalinks uncheck Strip the category base (usually /category/) from the category URL.

It worked fine but now the /blog/ base is back!

Since this is hardcoded into WordPress, it is going to reappear in in the site specific setting under Permalinks. Anytime you refresh the permalinks from here (or any time another plugin does the same) the /blog/ will reappear. If you habitually work on a multisite you may need to get out of the habit of refreshing permalinks from this area. You can refresh them from the site settings in the Network admin (presuming you have network admin access).

This seems pretty complicated. Is there no way to change this?

There is a ticket in core that has been open for several years now if you wish to contribute (please do!) Looks like there is also a working patch :)