Support » Fixing WordPress » $_SERVER['SERVER_NAME'] in WP_SITEURL ?

  • A client has two domains, and wishes to split a product catalogue over them.
    They want to have a shopping cart that is shared over both, i.e. a shared session over the two domains, this is solved in principle at least, and not the point of this question.

    Am using WooCommerce (no choice in this).

    Since the products need to available to be ordered in one transaction, they need to be in the same database, so I don’t think a normal multisite install is going to work.

    I’m hoping therefore to be able to use a single WP install, and simply put $_SERVER['SERVER_NAME'] in WP_SITEURL & WP_HOME.

    I’ve seen very few references to doing this, so I’m nervous about possible unforeseen consequences.

    Can anyone reassure me, or perhaps tell me why I shouldn’t do this?

  • The topic ‘$_SERVER['SERVER_NAME'] in WP_SITEURL ?’ is closed to new replies.