I am working on a new version our site. Today I was going to put the blog on the new version.
Our current website and the successor I am building are on different servers and accessed by different domain names.
So what I did was import the database the blog uses into the dev site. Then I copied all the files and put them on the dev site. On the dev site I went to /blog/wp-admin and I changed the general settings so the blog URL would use the dev domain.
I made NO CHANGES on the current production website server. However the current production website’s blog is now broken. When I go to blog/wp-admin on the real site, the form posts to the dev server.
I am not able to log into wordpress on either the dev or production site now.
I do not understand how I could break anything on the production server by making changes on a completely separate server that is unrelated to the production server.
So my main goals now are to:
-
Restore the blog on production
server (undo the changes I made
today) and get it working again
right away. -
Figure out what I did wrong so I can
put the blog on the production
server.
3 Answers
If you didn’t hand-change the wpurl in the dev database, what probably happened is that you entered your url, and WP made a 301 redirect to the live site. Then, without realizing it, you changed the url config in your live site.
To make it work:
Put this in your wp-config.php
define('WP_SITEURL', 'http://your-wp-url.com');
define('WP_HOME', 'http://your-wp-url.com');
That should do it.