October 19, 2014 at 4:55 pm #128354PelowtzMember
To anyone that can help w/ using IMPORT BUDDY-
Last night I used import buddy to create an exact copy of my site at http://www.vapementors.com (source site) to be used for staging on another URL (newtheme.jesseplautz.com/vapementors). I did not create a new database in step three of import buddy for the destination site.
BTW this staging site is on a COMPLETELY different hosting account, but using the same hosting provider (Go daddy)
This morning I see that while my homepage is on the correct URL, all internal links are redirecting to the destination site at newtheme.jesseplautz.com/vapementors. This includes my /wp-admin login page. when I try to access vapementors.com/wp-admin I get redirected to this exact URL:
The iThemes help page has this information about this problem regarding site migration with buddy press:
This occurs if the new database settings were not entered during Step 3 of importbuddy.php. Because of this, both sites are now sharing the same database so one of them (usually source) is redirecting to the other (usually destination). importbuddy.php needs to be re-run inputting the source URL on Step 3 and using the source database settings. This will reconfigure the source database to use its proper URL. Next importbuddy.php needs to be run again inputting the destination URL on Step 3 with the NEW database settings for the new database. This way both sites will have their own database for their respective URLs.
importbuddy no longer overwrites existing WordPress databases by default so this issue is not as common as it used to be.
I can confirm by looking at the WP-config file that both sites are referencing the same database. I do remember choosing to overwrite the existing database in the destination URL.
My question is this:
Do I delete the destination site first? Or do I run import buddy up to step 3 to fix the current DB, then delete? Do I delete at all?
As you know I can't run import buddy when there is already a wordpress installation in the destination. However I am scared of deleting the site because right now the site is "working" - i.e. people can still navigate to a site that looks identical, even though the URLs all have "newtheme.jesseplautz".
Please advise ASAP. I want to know what the risks are of deleting the destination site and re-running import buddy. Will this fix the redirect problem? Will I be able to login to the /wp-admin page without being redirected?
Thanks for any info.
Jesse.http://www.vapementors.comOctober 20, 2014 at 9:02 pm #128553PelowtzMember
I Played around with just about everything, including the htaccess file, and finally got it to work. Surprisingly it was not the htaccess file. It was the wp-config.
The main problem was that I could not even login to the backend of wordpress to edit the permalinks, and the htaccess file edits weren't the resolution.
Here is a summary of the problem and the solution, for the record in case anyone else has this problem.
1. When trying to make a COPY of my site as a staging/dev setup (i.e. not migrating it), I did not create a new database in the destination URL. Also (like an idiot), I went into the advanced options of import buddy and chose to delete the current database and overwrite what was there. Don't do this.
2. Additionally, Instead of using the new database settings I told import buddy to reference the source site's database. This made it so both sites were referencing the same database.
3. Import buddy overwrote the wp-config.php file of my source site and my destination site.
4. As an added "WTF?" I found out that TextEdit on my Mac was inserting invisible characters in the code when using that to edit. This caused errors in the wp-config.php file and made it appear as though this was not the problem when I first tried to edit this file. I ended up editing it in TextMate and it fixed the problem
5. I don't know if this next step was necessary, but I did it anyway.
Backup Buddy's troubleshooting guide told me that because I used the source site's database settings instead of a new one in the destination, I would have to re-run import buddy with the new DB settings and that would fix the problem. So, I deleted the destination site (on more than one attempt) and re-ran import buddy.
What I did not do on the first three attempts is go back into the advanced settings and select "delete database again". This scared the Shi! out of me but I was desperate. It worked, and on that final attempt I used the original source site's DB settings while overwriting the current DB.
Then I deleted the destination site one last time and re-ran import buddy with my new destination site DB settings. Most importantly I put a new DB prefix on the destination site's new DB. This was one of two key mistakes I made on my first attempt.
This almost fixed the problem. If I remember correctly I was still getting redirected to my destination site every time I clicked on an internal link in my source site. So I had to go back into my FTP and check the wp-config.php file. This time I used TextMate to put the correct DB settings on both sites and overwrite the files. Now both sites were most certainly pointing to their own unique databases.
I wasn't totally out of the woods. I was still stuck in a redirect loop from source to destination when I tried to login to the backend. The way I fixed this problem was instead of going to /wp-admin I went to /wp-login.php on both sites. For some reason this worked and I was able to login on both sites to their respective back ends.
Whew! Hope this helps someone else like me.
DON"T EVER DELETE A DATABASE (unless you know EXACTLY what you are doing)
Do a full backup before you do anything
Check your Backup Buddy settings regularly to make sure your site is being backed up like you expected. I found out that my stash was full and hadn't accepted a backup in a month. Luckily I had a backup from 10/15, otherwise I would have been REALLY screwed.
Follow the directions exactly on the importbuddy screens. Don't assume you know what will happen
Heed the warnings from the advanced settings section of import buddy
In emergency situations like this, don't wait to ask for help. I should have posted in this forum ASAP, rather than waiting 3+ hours trying to troubleshoot myself. Likewise, call someone who knows more than you, even if it costs you money.
- The topic ‘[Urgent] Import Buddy: Source Site Is Redirecting To The Destination Site’ is closed to new replies.