Support » Requests and Feedback » [Suggestion] Remove or give user a way to bypass siteurl?

  • shazhouke

    (@shazhouke)


    Hi, Guys
    Here’s my case.
    I am new to WP. I created my first WP blog on a local machine in LAN with DDNS. The DDNS service is not very stable, sometimes I need to access with IP addr. So here’s the problem. If I set ‘siteurl’ to IP based url, people out side the LAN can never access the site. If it’s hostname based, sometimes I got hostname resolution failure, even I am just working on the server.

    My proposal is, may be we can use $_SERVER[‘HTTP_HOST’] instead of ‘siteurl’ option when generating the pages. Because $_SERVER[‘HTTP_HOST’] is the address user used to reach the server, it’s always reachable.

    I did some investigation.
    1. search for ‘SELECT’ operations on the option table
    2. replace the URL in value of ‘siteurl’ with $_SERVER[‘HTTP_HOST’]
    Everything works perfectly.

    I am not sure if ‘siteurl’ is a MUST for any other use cases. Any idea?

  • The topic ‘[Suggestion] Remove or give user a way to bypass siteurl?’ is closed to new replies.