• Hi everyone,
    I’ve been trying to fix this problem for a while now and can’t find where it’s coming from. I bet a coder can figure this out in two seconds so I thought I’d ask.

    The Problem: on every page the code quoted below appears, including within the actual admin panel. Here’s a copy-paste from my dashboard, for example:

    Incoming Links
    define(‘WP_HOME’,’https://example.com’); define(‘WP_SITEURL’,’https://example.com’);

    Plugins
    define(‘WP_HOME’,’https://example.com’); define(‘WP_SITEURL’,’https://example.com’);

    The Background: Earlier today I accidentally changed the URL of my website in my Settings panel and had to take phpMyAdmin measures to fix it back (it would not let me access Settings->General and would instead redirect to what looked like a mangled version of my front page).

    This problem and its possible fixes are well-documented, and I followed the instructions offered by the WP knowledge base and support forums, including the suggestion to add the following to my wp-config.php (with the website substituted with my own):

    define('WP_HOME','https://example.com');
    define('WP_SITEURL','https://example.com');

    The above two lines of code did not do the trick and in fact replaced my front page with only that text. Weird. So I instead manually went into my database and changed the site URL value back to https://mysite.com/wordpress, which gave me back my layout.

    The only thing is that now every page starts with those two lines of code, as referenced above in my description of the problem.

    EDIT: the site is rocktherunway dot ca/wordpress, so you can see for yourself when you load the front page (when rendered, you can select all text and it’s visible in the top left corner)

    Any help would make me enormously happy.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tripleg

    (@tripleg)

    I wasn’t clear: I should also note that I deleted those lines of code from wp-config.php when I saw they didn’t work, and that I was clever enough to alter “https://www.example.com/” to my actual website location, in case anyone asks.

    Essentially, I’m trying to find why those lines are being included everywhere, especially since I didn’t add them to my site and deleted the only reference to WP_HOME and WP_SITEURL immediately after I found it didn’t work.

    Thread Starter tripleg

    (@tripleg)

    Further behaviour: I’ve just noticed that Settings->General has greyed-out the “WordPress address (URL)” and “Site address (URL)”, so I couldn’t change it through anything other than phpMyAdmin even if I wanted to.

    I hope someone can tell me what WordPress is doing. I’ve downloaded the site and searched for terms like “example.com” to no avail, so I don’t even know where to look. (Sorry to spam with a third post; it won’t let me edit anymore).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP is placing "define('WP_HOME','https://example.com');" everywhere’ is closed to new replies.