• GoDaddy Community
  • Managed WordPress Hosting
  • Managed WordPress Hosting

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution
    Highlighted
    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?

    2 REPLIES 2
    Helper VI Helper VI
    Helper VI
    Solution

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

    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
    New

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

    It looks like cache was the issue.  Thanks!