Workaround to get a /blog site on WordPress multisite

The following words are reserved for use by WordPress functions and cannot be used as blog names: page, comments, blog, files, feed

Last month I said that I would soon be redesigning and re-architecting my website, including this blog. It has now begun!

Losing the subdomains

Something I want to do is standardise the URLs used on the site. Once upon a time I had an idea of using subdomains for all my mini-sites, so

  • blog.garethjmsaunders.co.uk
  • blueprint.garethjmsaunders.co.uk
  • mahjong.garethjmsaunders.co.uk
  • psion.garethjmsaunders.co.uk

I got as far as setting up my blog on a subdomain and I changed my mind. (Or got lazy, I can’t remember now.) 11 years later I have now decided to bite the bullet and move from blog.garethjmsaunders.co.uk to garethjmsaunders.co.uk/blog. It’s potentially going to involve a lot of work (and a little .htaccess wrangling) but it will be worth it in the long run.

WordPress doesn’t like blog sites

My plan was to create a new sub-site called “blog” but when I set up a WordPress multisite installation on my local machine to test how this would all work I encountered an unexpected problem. When you try to create a new site called “blog” WordPress multisite returns this error message:

The following words are reserved for use by WordPress functions and cannot be used as blog names: page, comments, blog, files, feed

Ah!

Workaround

The workaround I worked out, however, is pretty simple:

  1. On the WordPress multisite default site, create a new page called “Blog”, with the URL of ‘/blog’. (On my localhost test site this has a URL of http://garethjmsaunders.shed/blog/.)
  2. In Settings > Reading set the posts page to be your new “Blog” page.
  3. Now import your blog into this site. (I imported it category by category, one at a time as I have a lot of posts.)

Of course, if you want your blog to use a different theme than the rest of the default site pages you will need to use a multiple theme plugin.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>