Support » Plugin: LH HSTS » Relocated WordPress core directory issues

  • Resolved Andrew Taylor


    Hi Peter,
    Thanks so much for creating this plugin. It is simple and does one job well. I did notice an issue though when using it on a site where WordPress core is in its own directory.

    I am installing WordPress via Composer into a “wp” directory. I’ve defined WP_HOME to be my site URL and WP_SITEURL to have “/wp” appended to accommodate the relocated WordPress core location.

    This plugin uses get_site_url(), which return the ‘siteurl’ value – in my case with the “/wp” appended causing a redirect loop on the frontend of the site.

    Can you update the plugin to use get_home_url(), which returns the ‘home’ value instead?

    This solved my issue. I was unable to find a GitHub repository for the plugin, otherwise, I would have made a pull request.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Here is the patch file

    Plugin Author shawfactor


    I have made those changes and should hopefully, now work, please test and also if you wish to become a contributor I am more than happy


    Thanks for the quick update Pete – it works great! I’m not sure about being a contributor. I already have a pretty heavy contribution burden on other projects. Also I can’t think of any features I would add. I like that the plugin is simple and does one thing well – add the HSTS header. If I run across other issues I’ll let you know. Thanks for making this!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Relocated WordPress core directory issues’ is closed to new replies.