How to redirect a wordpress multisite to a particular blog?

One of my client who has a wordpress multisite application developed by me made a request that she wants to redirect the site to a particular blog due to some reason. FYI, wordpress in multisite mode allows you to set up multiple blogs under the same installation and manage all of them via network administrator(s).

I thought it will good to write a post about the steps one needs to take to achieve this.

  1. Log in to wp admin panel and make sure you have all the rights (superuser or network administrator).
  2. Select Network Admin => Sites and edit the site you would like to redirect to when say is requested in the browser.  Change it’s path to ‘/’ and make sure that the checkbox that says Update siteurl and home as well is checked. Also make sure the domain is set correctly without any subdomain or subfolder path. Click save button.
  3. Look for the following code below in wp-config.php file and modify the number that is the ‘ID’ of the blog you would like to appear when the URL above is requested. In my case, it was number 3, so, the code statement looked like:

  4. Select Network Admin => Sites and edit the site that you don’t want to appear as default site anymore. Change it’s path to a relevant subfolder e.g. ‘/movies/’. Make sure the update checkbox is checked similar to point 2 above. Click save button.

If you follow the steps above carefully, you will get the expected result as I followed them and gave a maintenance service to my client.

Siddharth Pandey

Siddharth Pandey is a Software Engineer with thorough hands-on commercial experience & exposure to building enterprise applications using Agile methodologies. Siddharth specializes in building, managing on-premise, cloud based real-time standard, single page web applications (SPAs). He has successfully delivered applications in health-care, finance, insurance, e-commerce sectors for major brands in the UK. Other than programming, he also has experience of managing teams, trainer, actively contributing to the IT community by sharing his knowledge using Stack Overflow, personal website & video tutorials.

Advertisment ad adsense adlogger