• pawel.skura

    (@pawelskura)


    Hello Everyone,

    I’ve searched for related topics, but haven’t found any solution to my problem.

    Here’s what I encounter:
    I’m using dollarwp as my hosting provider and there’s an option of multisite when creating an instance. The problem is that I don’t want to use subdomain, but subdirectory. It’s just much more clear for me. Default setting of wp-config is to allow subdomain, so I went and changed ‘true’ to ‘false’ and everything was okay. Then I created a sub-site and it saved, everything was fine.

    Now, all the problems started:
    1. I can’t see sub-site when I hover over ‘My Sites’ button;
    2. I can’t access Network Admin – it tells me there’s too many redirects.
    3. I can’t access sub-site admin either, even though the website is active – same problem with redirects.

    Here’s what I tried:
    1. Removing .htaccess file and editing it according to many different solutions found on the web. None worked, after removing the file I was getting only home page of the main site, everything else was corrupted. I was able, however, to get login screen for both not-working admin panels, but after typing in username and password it didn’t let me go through.
    2. Changing wp-config file in many ways found on the web, but neither worked. Some of them even corrupted the main website.
    3. Contacting my provider and they have disabled CDN in order to see if there’s any improvement. None so far.
    4. Experimenting with https://www./non-www. versions of the domain in config files – seems like there’s no difference.
    5. Updating MySQL database to use www. domain version – no effect so far.

    My website is: https://www.protradeadvisors.com/
    Admin: https://www.protradeadvisors.com/wp-admin/
    Network Admin: https://www.protradeadvisors.com/wp-admin/network/
    Sub-site address: https://www.protradeadvisors.com/pl/
    Sub-site Admin: https://www.protradeadvisors.com/pl/wp-admin/

    Apart of first two and sub-site, nothing else works.

    Wp-config file:

    define(‘WP_HOME’,’https://www.protradeadvisors.com’);
    define(‘WP_SITEURL’,’https://www.protradeadvisors.com’);

    /* Multisite */
    define(‘MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, false);
    define(‘DOMAIN_CURRENT_SITE’, ‘www.protradeadvisors.com’);
    define(‘PATH_CURRENT_SITE’, ‘/’);
    define(‘SITE_ID_CURRENT_SITE’, 1);
    define(‘BLOG_ID_CURRENT_SITE’, 1);

    define(‘ADMIN_COOKIE_PATH’, ‘/’);
    define(‘COOKIE_DOMAIN’, ”);
    define(‘COOKIEPATH’, ”);
    define(‘SITECOOKIEPATH’, ”);

    .htaccess file:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^protradeadvisors\.com
    RewriteRule ^/?home/(.*)$ https://www.protradeadvisors.com/home/$1 [R=301,L]

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

    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress

    GZip Ninja Speed — Starts here
    # Do not write anything between “GZip Ninja Speed — Starts” and “GZip Ninja Speed — Ends”
    # It will be deleted while uninstalling GZip Ninja Speed plugin
    AddOutputFilterByType DEFLATE text/plain #GZip Ninja Speed
    AddOutputFilterByType DEFLATE text/html #GZip Ninja Speed
    AddOutputFilterByType DEFLATE text/xml #GZip Ninja Speed
    AddOutputFilterByType DEFLATE text/css #GZip Ninja Speed
    AddOutputFilterByType DEFLATE application/xml #GZip Ninja Speed
    AddOutputFilterByType DEFLATE application/xhtml+xml #GZip Ninja Speed
    AddOutputFilterByType DEFLATE application/rss+xml #GZip Ninja Speed
    AddOutputFilterByType DEFLATE application/javascript #GZip Ninja Speed
    AddOutputFilterByType DEFLATE application/x-javascript #GZip Ninja Speed
    AddType x-font/otf .otf #GZip Ninja Speed
    AddType x-font/ttf .ttf #GZip Ninja Speed
    AddType x-font/eot .eot #GZip Ninja Speed
    AddType x-font/woff .woff #GZip Ninja Speed
    AddType image/x-icon .ico #GZip Ninja Speed
    AddType image/png .png #GZip Ninja Speed
    # GZip Ninja Speed — Ends here
    # GZip Ninja Speed — Starts here
    # Do not write anything between “GZip Ninja Speed — Starts” and “GZip Ninja Speed — Ends”
    # It will be deleted while uninstalling GZip Ninja Speed plugin
    AddOutputFilterByType DEFLATE text/plain #GZip Ninja Speed
    AddOutputFilterByType DEFLATE text/html #GZip Ninja Speed
    AddOutputFilterByType DEFLATE text/xml #GZip Ninja Speed
    AddOutputFilterByType DEFLATE text/css #GZip Ninja Speed
    AddOutputFilterByType DEFLATE application/xml #GZip Ninja Speed
    AddOutputFilterByType DEFLATE application/xhtml+xml #GZip Ninja Speed
    AddOutputFilterByType DEFLATE application/rss+xml #GZip Ninja Speed
    AddOutputFilterByType DEFLATE application/javascript #GZip Ninja Speed
    AddOutputFilterByType DEFLATE application/x-javascript #GZip Ninja Speed
    AddType x-font/otf .otf #GZip Ninja Speed
    AddType x-font/ttf .ttf #GZip Ninja Speed
    AddType x-font/eot .eot #GZip Ninja Speed
    AddType x-font/woff .woff #GZip Ninja Speed
    AddType image/x-icon .ico #GZip Ninja Speed
    AddType image/png .png #GZip Ninja Speed
    # GZip Ninja Speed — Ends here

    Please help as it is the production website and we strongly relay on it with our income.

    Thank you in advance!

Viewing 8 replies - 1 through 8 (of 8 total)
  • jkhongusc

    (@jkhongusc)

    Your htaccess file is not correct for subdomain. You need to be able to access your Network admin menu. In there it will provide you your wp-config.php and .htaccess settings.

    Your network admin link works for me. I see the login form. Can you log in?
    https://www.protradeadvisors.com/wp-admin/network/

    From there look under Settings -> Network Settings. I think you will need to set this parameter in wp-config.php before accessing Network Settings:

    
    define( 'WP_ALLOW_MULTISITE', true);
    

    James

    Thread Starter pawel.skura

    (@pawelskura)

    Hi James,

    Thank you for your answer.

    I missed the line of code when copying before, but

    define( ‘WP_ALLOW_MULTISITE’, true);

    was there before.

    I tried to login, but it redirects me to main site login form, so there’s some bug within .htaccess I guess. The thing is I cannot identify it.

    Also, I want to use subdirectory, not subdomain.

    Have you got any other suggestions that I may try?

    Many thanks!
    Pawel

    Thread Starter pawel.skura

    (@pawelskura)

    Now I get “redorected too many times” message when trying to access network admin.
    When I took the .htaccess out, nothing worked, apart of the homepage of the main site, everything else got corrupted.

    jkhongusc

    (@jkhongusc)

    I dont know where you got some of your wp-config.php settings. I would use something like this:

    
    /* Multisite */
    define( 'WP_ALLOW_MULTISITE', true);
    define(‘MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, false);
    define(‘DOMAIN_CURRENT_SITE’, ‘www.protradeadvisors.com’);
    define(‘PATH_CURRENT_SITE’, ‘/’);
    define(‘SITE_ID_CURRENT_SITE’, 1);
    define(‘BLOG_ID_CURRENT_SITE’, 1);
    

    Your WP_HOME, and WP_SITEURL are probably breaking your subsite logins. I dont know why you are setting cookie information manually.

    • This reply was modified 8 years ago by jkhongusc.
    Thread Starter pawel.skura

    (@pawelskura)

    Still the same.
    I tried without .htaccess file and to remove the /* Multisite */ section from wp-config.
    Main site works properly regardless, the rest isn’t working.

    Furthermore, my provider says everything works properly – no one even investigated it…

    If the problem persists and they won’t support me, I’m willing to move from the provider to someone else. Please recommend hosting with a good support, so they can help me set it up.

    Many, many thanks!

    jkhongusc

    (@jkhongusc)

    Wait, once you remove the .htaccess file and only use the wp-config.php defines as I show you. Go to https://www.protradeadvisors.com/wp-admin/network/ From there look under Settings -> Network Settings.

    Get your .htaccess file and wp-config.php commands. Once you set the .htaccess file, your subsites will work.

    Thread Starter pawel.skura

    (@pawelskura)

    I deleted .htaccess and tweaked wp-config as you showed above. Now I received database error.

    I reverted back to the old wp-config file and website is back up. Didn’t upload .htaccess.

    I’ll try to purge database and reinstall the instance from the scratch, then copy backup files to the server through ftp using .htaccess and wp-config files provided with the Multisite setup.

    Do you think it’s a good idea?

    jkhongusc

    (@jkhongusc)

    > Do you think it’s a good idea?

    No, you did something wrong. You wp-config.php needed to remove (6 lines); you must have done something else. WP core and other files are fine.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Unable to access Network Dashboard and sub-site Dashboard when using Multisite’ is closed to new replies.