Forum Replies Created

Viewing 15 replies - 1 through 15 (of 894 total)
  • You might need to re-install WP. WP multisite cannot really change from subdomain to subdirectories without a lot of manual fixes. With new systems it is better to re-install from scratch. That is my guess as to the cause of your 403. It is possible that your Apache httpd is not configured right too.

    > Is it okay or is there some misconfiguration?

    This is normal. I guess its there in case you delete or damage your .htaccess file.

    If you are using Apache httpd, mine looks like this (if using subdomains):

    
    <VirtualHost *:80>
        ServerName www.domain.com
        ServerAlias *.domain.com
        DocumentRoot /path/wp
    
        <Directory /path/wp>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    </VirtualHost>
    
    <VirtualHost *:443>
        ServerName www.domain.com
        ServerAlias *.domain.com
        DocumentRoot /path/wp
    
        SSLCertificateFile /certpath/cert.crt
        SSLCertificateKeyFile /certpath/cert.key
        SSLCertificateChainFile /certpath/chain.crt
    <snip a bunch of other configs>
    
        <Directory /path/wp>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    </VirtualHost>
    

    Note to support ssl, you will need a wildcard certificate or multi-domain certificate.

    Sounds like you did not update your .htaccess file. Look in the console for the rules you need to add.

    You will need to adjust the AWS WAF rules to bypass the false positivies. You can do this by either deleting the XSS Rule or you can modify the XSS Rule. For example you can modify the XSS Rule to not run when the path contains a specific pattern, like ‘wp-admin’

    Note that you are asking an AWS WAF question; and not WP or WP multisite =)

    > What I wanted to know is can I have multisite installation for WP , thus using the same installation to control different sites from the same dashboard.

    Yes this is possible with WP multisite. I have it setup using Domain Mapping plugin. Note that you might run into problems with logins and SSL certificates. It depends on your host. To be clear one of my WP sites has over 400 sites with names like:
    *.domain.com
    domain2.com
    domaain3.com

    Thread Starter jkhongusc

    (@jkhongusc)

    Sorry was on vacation for two weeks… Tokyo which was an awesome experience. I deployed a plugin that added a link to the admin bar that allows Administrators to purge the alloptions cache for a single site. I didnt feel comfortable automatically purging alloptions upon every add/delete/update option event. Unfortunately our project manager who manages the sites with our (internal) clients is on vacation now. So we’ll have to wait more to see if purging alloptions (plugin) works for us.

    Thread Starter jkhongusc

    (@jkhongusc)

    Thanks for the prompt and detailed response! I’m not sure all of our issues are due to alloptions, though that is the most common source of our problem. I think I will implement that wordpress.com workaround.

    I would also like to add a delete site’s object cache feature to cover the use-case if it is not alloptions. I’d like to create a plugin to add a “delete object cache” to the admin bar. I will try to use your WP_Object_Cache to do the deletes. I assume that redis keys are in the format “<site_id>:<object_name>”. I did a key count on our biggest site: 250k keys. I’ll have to test to see how feasible it is to delete 250k keys.

    > It will ask me to login again. then I get this message: ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.

    What url are you using to login: http://www.main.com/wp-login.php or http://www.secondsite.com/wp-login.php? If you are using the secondsite url and getting the Cookies error, check your wp-config.php. See if you have COOKIE_DOMAIN defined in there. Make sure you have sunrise.php in wp-content; which sets the COOKIE_DOMAIN.

    Your configuration is slightly different than mine; but I think it should work. I have:

    1. Domain Mapping: 3,4
    2. Domains: Site ID: 3 Primary: Checked

    What happens when you try to access http://www.secondsite.com/wp-admin/ What kind of error/response do you get?

    How did you setup your non-main domains? I follow the configuration instructions on the plugin site – https://wordpress.org/plugins/wordpress-mu-domain-mapping/

    What wp-admin -> Network -> Settings -> Domain Mapping -> Domain Options did you set? Esp #4 Redirect administration pages…

    Also you would have to map the subsite in wp-admin -> Network -> Settings -> Domains -> New Domain. Enter the site id and mapped Domain: e.g. site_id 2 is mapped to http://www.secondsite.com

    The above should get your subsite (wp-admin) working for http.

    If you are using the MU Domain Mapping plugin, then the configuration should be straightfoward. What problems are you having with that plugin? I use the plugin and have my multisite WP configured for multiple domains. The main problem most people will encounter is with ssl certificates for https. If you require https, your host may not be able to handle multiple ssl certs.

    • This reply was modified 5 years, 11 months ago by jkhongusc.

    You have a cookie configuration problem. My guess is that you have COOKIE_DOMAIN defined in wp-config.php. How did you configure your second sites domain? Did you just edit siteurl or did you use a plugin.

    Edit: You should be able to log into your second site with the original subdomain url – secondsite.mainsite.com/wp-admin.

    • This reply was modified 5 years, 11 months ago by jkhongusc.
    jkhongusc

    (@jkhongusc)

    > I would like to avoid plugins for domain mapping, since I’m not sure how much under active development are they, and that may be the problem in the long run.

    I have been using the MU Domain Mapping plugin for 5 years in multiple large systems – over 100k page requests per day. Havent had any issues. The hardest part is figuring out the right configurations at the beginning.

    > Can you clarify what did you mean by: “but this might break other things since your WP system might not be configured to handle multiple domains”?

    If you change the siteurl to a completely different domain AND have custom configurations in wp-config.php that conflict with the siteurl, you can break your site and not be able to access it. For example if you set siteurl to “www.domain1.com” and set define(‘COOKIE_DOMAIN’, ‘domain2.com’ );

    The only way to fix something like that after the fact is usually to modify the siteurl via database manually (e.g. phpmyadmin).

    jkhongusc

    (@jkhongusc)

    That is purely a DNS issue… nothing to do with WP. You need to configure your DNS to point all subdomains to your WP IP address.

Viewing 15 replies - 1 through 15 (of 894 total)