SiteCozy

  • My account

Switch your multisite wordpress install. from subfolder to subdomain – Tutorial –

2018-09-09

1. Add a DNS record:

In your DNS zone editor, you must add an entry to map the new subdomain(s) to the web server. In Cpanel, you would need to go to the subdomain section. Add a subdomain like mysubdomain.mydomain.com and link it to the subfolder of your web server where your WordPress multisite is installed.

2. Change wp-config.php

define('SUBDOMAIN_INSTALL', false); => define('SUBDOMAIN_INSTALL', true);

3. Add redirects to htaccess

Add the following redirects at the top of your htaccess file to redirect from your former subdirectories to your new subdomain URLs:

RewriteRule ^formersubdirectory/(.)$ https://newsubdomain.tomydna.com/$1 [R=301,L]

Check if your redirection directives are OK in htaccess. 

4. Change your site URL in WordPress

Login to your main network site. Choose Network admin > site. Choose the website that you want to modify and click edit. Change the “site address URL” from the subdirectory to the subdomain URL

Related Posts:

  • How to move a multisite wordpress install from subfolder to subdomain
  • Create a subdomain in Cpanel - tutorial & explanation
  • Htaccess code for a WordPress subdomain multisite
Download our Broken link checker freeware here Buy a license key for the Sitecozy broken link checker

Customer Login

Lost password?

Categories

  • Webmaster advice
  • SEO advice
  • Web hosting
  • SiteCozy link checker KB
  • WordPress theme & plugin reviews
  • All articles
Disclosure: We are a professional review site that receives compensation from the companies whose products we review. We test each product thoroughly and give high marks to only the very best. We are independently owned and the opinions expressed here are our own.

Copyright Sitecozy 2018