• I had a major problem with my server yesterday when I uploaded a theme, but did not activate it. See this thread: https://wordpress.org/support/topic/uploading-theme-changes-siteurl?replies=3

    The outcome of this is that I would like to better understand what Live Preview (as opposed to Activate) does.

    The theme I was handed by my designer had the following lines in function.php:

    update_option(‘siteurl’,'<server>/’);
    update_option(‘home’,'<server>/’);

    Is it correct that even in Live Preview mode these lines will be run? Since these are “server-wide” settings, does that effectively mean that Live Preview of a theme, before it is activated, has the potential to bring a web site down?

    And, in summary, do lines like this generally belong in a theme that is intended to be installed on a different server (which, I assume, is a best practice anyway – no idea why a theme would hard code where it is installed).

    I’d love to understand all this more, for future reference.

    Mark

Viewing 2 replies - 1 through 2 (of 2 total)
  • The answer as to why those lines are there can only come from the one who placed them there, and I would guess they were never intended to be left there in any active state. As to uploading, I would say any upload from anywhere other than wordpress.org could be risky. As to “Live Preview”, that should be no different than a temporary tattoo that can easily be washed away leaving no mark behind…but then again is the matter of a source being trustworthy.

    Thread Starter markwill

    (@markwill)

    Thank you, leejosepho. This was something of a learning process to me. I didn’t realize a theme could do so much damage until it was activated but it makes sense now 🙂

    Thanks.

    Mark

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘What exactly does Live Preview do?’ is closed to new replies.