Cannot Change SiteURL

I occasionally need to change the SiteURL in order to demo a site using ngrok or localtunnel (or by exposing the machine to the internet using dyndns). Normally I just change the WordPress Address URL and the Site Address URL, and then use a search and replace plugin to change any others.

The SiteURL and Address are greyed out and cannot be changed due to the changes made by s2member to the wp-config.php. I need to find the best method for changing the URL to the site, when s2member is installed.

localtunnel will work without any changes, but only in http mode. If I try to access the site using https, it loads but is broken.

These are the lines put in the wp-config.php by s2member:

define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’]);
define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’]);

If I try to comment these out, the site breaks.

Hi John,

The SiteURL and Address are greyed out and cannot be changed due to the changes made by s2member to the wp-config.php.

What changes do you mean? :slight_smile:

In Dashboard—>Settings—>General It is not possible to change:
WordPress Address (URL)
Site Address (URL)

Since Values for those are coded variables that s2member sticks into the wp-config.php. Those values cannot be commented out without killing the site.

Right now the site is at “http://localhost”. I need to change the site urls to a different host easily.

localtunnel (similar to ngrok) is designed to give access to the site via https, even if the site is not running with SSL. However, there is no transparent way to make this work.

Is your local dev on Windows? Why not just make the website whatver u want using your c:\Windows\System32\drivers\etc\ hosts file?

That solves some but not all issues. I am concerned about when it comes time to move the site. But now I have SSL issues as well.