• I read where you add this into your functions.php page

    update_option( 'siteurl', 'https://example.com' );
    update_option( 'home', 'https://example.com' );

    IF MY SITE resides in a subdirectory – is the modification now this:

    update_option( 'siteurl', 'https://example.com/subdirectory' );
    update_option( 'home', 'https://example.com' );

    or this:

    update_option( 'siteurl', 'https://example.com' );
    update_option( 'home', 'https://example.com/directory' );

    Or something else?
    Either the support page that explained this has been edited or I could not find the proper page.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • WordPress files reside in the WordPress URL or site_url(), where the public-facing URL for your site is controlled by the Site Address URL or home_url().

    So, if you’re doing this via functions.php, you’d use:

    update_option( 'siteurl', 'https://example.com/subdirectory' );
    update_option( 'home', 'https://example.com' );

    I hope that helps!
    Eric

    Thread Starter tg1

    (@tg1)

    Thanks Eric – that’s what I thought. I appreciate you taking the time!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Site URL sub directory functions.php clarification.’ is closed to new replies.