Transferring WP Site to New Host- EXTREMELY DIFFICULT

bathunter

New member
Feb 17, 2012
39
0
0
So I've seen plenty of guides out there on the web about transferring a Wordpress site to a new host but NONE of them offer a complete explanation. I am planning on making a real guide that actually fills in all the gaps once I get this all figured out. I am trying to transfer my site http://colonirritable.net to HostGator from SEOHost. Right now the site just says "Error establishing a database connection".

Here is what I have done:

1. Made addon domain "colonirritable.net" in HostGator, installed Wordpress 3.5.

2. Replaced entire "wp-content" directory with my old "wp-content" directory from SEOHost.

THE KEY PLACES WHERE I PROBABLY MADE A MISTAKE:

3. In "PHP MyAdmin"- selected Databases> Selected the new Hostgator Database> Selected "Import"> Imported old database from SEOHost(after editing username to match the current one)

Now the database is "there" in PHP MyAdmin but it is not being connected to.

I also replaced the wp-config.php file and changed the DB_USER to the database I want- but the password I left the same as the database in SEOHost because I don't know if it has changed when I imported it or what.

Does anyone have experience with this?
 


Nice domain bro.

Try making a completely new user and password for MySQL

Remember if you put the plaintext password in phpmyAdmin for your wordpress admin, make sure you select the MD5 option in the dropdown
 
You need put the password of the new database in the wp-config.php. In plain text.
Also don't leave oldhost_dbname, use newhost_dbname instead
 
From the steps above, it doesnt look like you created a user and given it rights on the imported DB. Note that some hosts will just for e the initial characters on username and DB names, so make sure you have those checked in wp-config.php

Yeah, the guides I looked at a long time ago were crap.
 
Yeah, the guides I looked at a long time ago were crap.
Well, it's not exactly rocket science :)

Here's my favorite way of moving WP's:
Compress the whole thing into a zip via file manager, all of the site, not just wp_content, way easier than installing wp on the new host later.
Download zip.
Backup db.
On the new host:
Upload zip, extract.
Create DB/user
Import db.
Edit config.
Presto!
 
What do you mean plaintext password? What's the diff between plaintext and non-plaintext? My passwords look like "Cu9iop0RfTjkl"
 
Plain text means it's not encoded. "Cu9iop0RfTjkl" looks like plain text. I believe you should go to Digital Point forum and not come back. It;ll be more at your level..
 
And I want to try your method ShadowCaster. How do you compress the whole thing into a zip? Using backup wizard in cPanel? Backup wizard compresses everything (all addon domains in your host) so I'm unsure if that's what you're referring to.
 
Select all the files/folders and rightclick, there should be an option to Compress or similar.
 
Ok man I am on your step "Create DB/User" in my new host. I wanna make sure I do this right.

In PHP MyAdmin you can click "Import" and then import a database. How do you "Create DB/User" before this(I see that you mention "Import DB" as the next step)?
 
I did all the steps. I'm just waiting for the Nameserver changes to take effect to see if it worked or not.

Do you ever edit your database file before importing? I see a lot of urls to the old host and the old username are contained in the DB file.
 
Not really sure what urls you are talking about, but it should work fine without editing.
 
Holy fuck, just buy wptwin.

Seriously, if you're not familiar with renaming and fixing image paths, that tool will save you a lot of grief.
 
How to compress files:

Code:
$ tar cvzf myarchive.tar.gz foldername/
To edit your database files, use the folowing MySQL command (make sure you have a good backup first):

Code:
TRUNCATE wp_users;