• Good morning.
    I have just installed my WordPress MU. At the beggining it was with subdirectories, I added a new site like domain.co/site1, and it was working. Then I changed it to subdomains (changed the wp-config and htaccess), created the site1.domain.co, and it didn’t worked. It shows in the My Sites tab, but when I try to reach for the Dashboard, an error page shows saying that “The server can not find the requested page: site1.domain.co/wp-admin. The site1.domain.co is listed in the subdomains at cPanel, and in the Advanced Zone Editor it shows with the site IP.

    My wp-config:

    /* Multisite */
    define( ‘WP_ALLOW_MULTISITE’, true );
    define(‘MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, true);
    define(‘DOMAIN_CURRENT_SITE’, ‘sauva.co’);
    define(‘PATH_CURRENT_SITE’, ‘/’);
    define(‘SITE_ID_CURRENT_SITE’, 1);
    define(‘BLOG_ID_CURRENT_SITE’, 1);
    define(‘SUNRISE’, ‘on’);

    /* That’s all, stop editing! Happy blogging. */

    my .htaccess

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    I really don’t know what I’m doing wrong here.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I dont think you can switch once you select one of the configuration options. I believe it is possible to switch but takes a lot of manual labor.

    FYI, WP multisite subdirectory configuration can do sub-domains too. This option is the most versatile.

    You need a wildcard subdomain. Search online for instructions on how to do a subdomain installation on wordpress multisite.

    Thread Starter nadjavoss

    (@nadjavoss)

    @jkhongusc, you can switch by changing the “define(‘SUBDOMAIN_INSTALL’)”; to true or false, and then changing the

    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $1 [L]

    in the .htaccess ($1 becomes $2).

    My problem is with the wildcard. @nnikolov, it is set up *.domain.co, with the A pointing to my site’s IP. My host told me that the subdomains folders are created as subdirectories, so I have the site1.domain.co, and the folder for it is domain.co/site1/wp-admin, and that is why WPMU can’t access it. I can’t change it in the system (they told me), is there a way to make WP follow the path?

    I do not understand what this means:

    “My host told me that the subdomains folders are created as subdirectories, so I have the site1.domain.co, and the folder for it is domain.co/site1/wp-admin, and that is why WPMU can’t access it.”

    By the way, my htaccess on my subdomain installation looks like this, maybe your must be like this too:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Subdomains’ is closed to new replies.