WP is placing "define('WP_HOME','https://example.com');" everywhere
-
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.
- The topic ‘WP is placing "define('WP_HOME','https://example.com');" everywhere’ is closed to new replies.