• Resolved latin_l3oi

    (@latin_l3oi)


    Hello,

    This is my first WordPress Multisite install on a live server and I’m having trouble accessing the admin dashboard of the sub domain sites I created.

    (It’s also my first post in the WordPress Support forums)

    My Setup is something like this:

    Main Site: mainsite.com.au
    Sub Site 1: sub1.mainsite.com.au
    Sub Site 2: sub2.mainsite.com.au

    I can access mainsite.com/wp-admin without any problems.

    But when I try to access either sub1.mainsite.com/wp-admin OR sub2.mainsite.com/wp-admin, I get redirected to:

    http://www.someotherdomain.com.au/wp-login.php?redirect_to=http%3A%2F%2Fsub1.mainsite.com.au%2Fwp-admin%2F&reauth=1

    “someotherdomain.com.au” being another WordPress site (NOT multisite) running on the same virtual server.

    My web host said the wildcard DNS is setup properly and it must be a WordPress application issue.

    This is my .htaccess file:

    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]

    This is what I added to the wp-config.php file:

    define('WP_ALLOW_MULTISITE', true);
    
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', true);
    define('DOMAIN_CURRENT_SITE', 'mainsite.com.au');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);
    
    /* That's all, stop editing! Happy blogging. */

    Note: I’ve just replaced my actual domain with “mainsite.com.au”.

    Any help would be great, as I am completely stuck and I have been struggling to find a solution to this issue, Google returns me a bunch of domain mapping solutions which is if you want a different domain from what I can understand, but that’s not what I want, I just need Multisite subdomain install to function properly.

    Advise and suggestions will be greatly appreciated.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    “someotherdomain.com.au” being another WordPress site (NOT multisite) running on the same virtual server.

    Is mainsite.com.au an add on to someotherdomain.com.au ?

    it sounds like that site’s being honored first in so far as wildcards go, and you may need to park each subdomain manually.

    Thread Starter latin_l3oi

    (@latin_l3oi)

    Hi Ipstenu,

    Thank you for taking the time to read and reply to my query.

    Well, basically “someotherdomain.com.au” is a WordPress installation which I asked my web host to setup several weeks back.

    “mainsite.com.au” I believe is a separate instance of WordPress on the same server setup by my web host just last week.

    Below are bits of the emails I received from my Web Host’s Systems Administrator:

    “It’s possible to set up a wildcard DNS entry so all subdomains point towards your server. Then, if the multi-site configuration is able to dynamically handle additional sites, you would be free to scale up sites yourself.”

    And once it was setup, he said:

    I’ve registered your domain, created the account and database, downloaded and configured wordpress, added in DNS records and a wildcard CNAME for *.mainsite.com.au to MyServerName.

    Please let us know if you encounter any issues.

    Note: I’m replacing my actual domain with “mainsite.com.au” and actual server name with “MyServerName”.

    After that multisite didn’t work at first, so I thought it may be that the Wildcard DNS wasn’t configured, which he replied:

    You were correct on that assumption. I had added it for one of your other domains, but have now had it added to mainsite.com.au. Please give it a couple of moments and attempt to load the sites again.

    After that change, the page loaded but with only a message saying “MyServerName OK”, instead of the sub domains which I created within the Multisite dashboard. He then replied:

    I’ve added in a wildcard subdomain as a ServerAlias and I can now see sites loading.

    After that, multisite started working except for the issue that I’m having now which is that I can’t access the admin dashboard of the sub sites (sub1.mainsite.com.au and sub2.mainsite.com.au).

    I received this email from my web host:

    I cannot see any server-side redirects on the account. Considering you were provisioned a fresh database and the rewrite is likely within your application, this is not something I am able to help with. You may like to perform some research to see why this could be happening, as we do not manage your application.

    Sorry for the very long reply, but I’m not too experienced with server redirects and rewrites and I’m not sure what to do next to get multisite to work.

    In regards to:

    it sounds like that site’s being honored first in so far as wildcards go, and you may need to park each subdomain manually.

    What can I ask my web host so this can be accomplished? The web hosting provider does not support cpanel or plesk.

    Any suggestions would be extremely helpful.

    Thank you for your time.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Well… You can test this pretty simply.

    Remove WP. Don’t delete the database or anything, just … move the files into a folder so they’re not running.

    With WP out of the picture, NOW go to the subdomain.

    Same problem? Show your host and see “This happens WITHOUT WP, so it’s not WP. Please fix.”

    Otherwise you get to learn how to mess with vhosts.

    Thread Starter latin_l3oi

    (@latin_l3oi)

    Thank you for your advice Ipstenu!

    I moved everything under “public_html” to a new directory I created “WP_Backup” and when I visited the site: mainsite.com.au, I got a “Test page for Apache HTTP Server”, so I assume WordPress is no longer running, but when I went to sub1.mainsite.com.au/wp-admin, it still took me to http://www.someotherdomain.com.au/wp-login.php?redirect_to=http%3A%2F%2Fsub1.mainsite.com.au%2Fwp-admin%2F&reauth=1

    So I guess this means it’s not a WordPress issue and rather a server redirect / rewrite issue.

    Thanks for that. Hopefully now my web host can fix the problem. 🙂

    Thread Starter latin_l3oi

    (@latin_l3oi)

    Hello,

    Just to update, my problem is now solved.

    Here is the response I got from my web host:

    I have fixed up a reference to *.mainsite.com.au that was a server alias in the someotherdomain account and have now moved this to the mainsite account. It would be best if you could move the files back and try again. If this does not help the problem, it likely confirms the problem is within WordPress itself. As such, I will not be able to assist any further, as manage everything up to your code (but not including).

    I guess it was a server side issue and not a WordPress issue.

    Thank you Ipstenu for helping me solve this problem. I really appreciate it. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘New Multisite install, can't access admin dashboard of subdomain sites’ is closed to new replies.