• GoDaddy Community
  • Managed WordPress Hosting
  • Managed WordPress Hosting

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution
    New

    Why are changes to functions.php only affecting non-www site and not www site?

    I modified my functions.php so that it requires users to be logged in to access the WP REST API.  The changes work perfectly when the site is accessed without 'www'.  However, it does not work when the site is accessed with 'www'.  Shouldn't the functions.php file apply to the entire site, regardless of www or non-www?

    1 ACCEPTED SOLUTION
    Helper VI

    Technically, non-www and www are 2 separate domains/subdomain but most sites serve the same content.

     

    I can think of 3 ways this could happen off the bat...

    1) Cache.

    2) You have 2 WP installations, one is being served as www and the other is non-www.

    3) Scripts are executing relative to domain.

    ~Jan Mykhail Hasselbring Web Administrator @ fullstackwebsolution.com

    View solution in original post

    2 REPLIES 2
    Helper VI

    Technically, non-www and www are 2 separate domains/subdomain but most sites serve the same content.

     

    I can think of 3 ways this could happen off the bat...

    1) Cache.

    2) You have 2 WP installations, one is being served as www and the other is non-www.

    3) Scripts are executing relative to domain.

    ~Jan Mykhail Hasselbring Web Administrator @ fullstackwebsolution.com

    View solution in original post

    It looks like cache was the issue.  Thanks!