Join 3,524 readers in helping fund MetaFilter (Hide)


I am not a Jill of all Trades or Web Technologies.
November 10, 2011 2:31 PM   Subscribe

WordPressFilter: Helping a friend...site was on one host, wanted to move to new host. Downloaded entire site into a folder from ftp. Attempted to just put this on the new host. Chaos ensues. I don't even know where to begin.

I can fiddle around Wordpress ok but server/host stuff is beyond me. I don't even know what terms to use or what is going on. Someone else was supposed to be moving this site for him but now that's not happening. I worked on the site, but wasn't involved in any of the server/hosting stuff.

The new host for the site (same domain) does not have cpanel?!?! I thought all hosts had cpanel. So every tutorial and guide I can find has the user going through cpanel and/or phpMyAdmin to import the sql db backup.

The sql db backup is in the folder of everything that was downloaded from old host.

We have ftp access to the new site and wp-admin access, but no cpanel. So I'm confused. I've been trying to help for a few days now and my head hurts. I'm only getting more confused.

Please please hope me hope him.
posted by sio42 to Computers & Internet (35 answers total) 2 users marked this as a favorite
 
Is the original site still up? If it is, they can export an WXR file, which is a backup of the posts and comments and such, and import it into the new site. If the file is too big to import, there's WXRSplitter.
posted by Solomon at 2:34 PM on November 10, 2011


no. all we have is a folder with everything form the old site.
posted by sio42 at 2:37 PM on November 10, 2011


Are you just moving hosts or changing domain names as well?
Coz wordpress totally freaks out if you change the domain name.
posted by WizKid at 2:42 PM on November 10, 2011


An alternative would be to import the sql file to a local installation of WordPress (by using something like XAMP) and then export from there.

But, are you absolutely sure you have no way to manage your databases? Maybe SSH access? Who is your host?
posted by Memo at 2:43 PM on November 10, 2011


Just done it myself and, yes, WizKid, changed the domain name. These links helped:

http://codex.wordpress.org/Changing_The_Site_URL
http://codex.wordpress.org/Moving_WordPress
http://wordpress.org/support/topic/how-to-transfer-a-wordpress-blog-from-one-url-to-another

The key thing is to change the url in the Settings>General section before you move.
posted by TheRaven at 2:46 PM on November 10, 2011


duh. i'm sorry. changing domain names as well.

the host is a small local company.

i've had my friend trying to get a call back from them about how he is supposed to manage the db. no word yet.

i've read all those links and they just made me more confused. everything from the old was downloaded from the host and put in a folder. the old site does not exist anymore. i can't go back and change anything.

how do i do this install locally thing? i'm on mac air.

i'm so confused, because i understand about half of what is going on.
posted by sio42 at 2:51 PM on November 10, 2011


Is there any particular reason why you are with a small local host?
Most of the big name hosting places are pretty cheap and life would be much easier with something like cpanel
posted by WizKid at 2:54 PM on November 10, 2011


I think at this point since you don't have the old site running, you might need to run a script on that db dump to change the old domain name to a new one.
If you still have the old domain name then point it to the new host and then bring the site up there. After that you can change the domain name
posted by WizKid at 2:56 PM on November 10, 2011


explain more about this pointing old domain name to new host.

( i have no control over the host. not my decision. i use dreamhost and gave my 2c when asked. obviously ignored ;-)
posted by sio42 at 2:58 PM on November 10, 2011


Wordpress does this crazy thing where the DB will be full of references to the old location. You gotta open up the DB and do a search-and-replace for these and make sure they refer accurately to the new location. There's scripts that do this, out there.

This and prefix issues drove me nuts until I finally figured it out. (Be sure the prefix is right when you get the DB loaded back in.) I kept getting the White Screen or unwanted "this is a fresh, blank new WP install" screens.

It actually turns out to be way easier than you would think, if you heed the search-and-replace issue.

So if you can gain access to DB controls on your new host, you should be able to upload the old DB, make sure your wp-config.php accurately connects to it, and then be sure the DB makes proper references to the right location, and this method usually works OK.
posted by steinsaltz at 3:03 PM on November 10, 2011


can i open up the db in something to make these changes? i've got a win machine with sql server. or a text editor. tell me to find and replace and i can do it.

i cannot access the db right now via the new host, hence the whole big issue. or i might have been less confused. grar.
posted by sio42 at 3:06 PM on November 10, 2011


can i upload this db onto my site somehow without screwing anything up with my site? could i do the search and replace there?

i have cpanel and phpMyAdmin and all that stuff this other host doesn't have.
posted by sio42 at 3:07 PM on November 10, 2011


Yeah, you can open up a .SQL dump file in a text editor and do the replace there.
posted by steinsaltz at 3:08 PM on November 10, 2011


ok, so in wp-content/backup there is a folder that says backup.sql

i open this in a text editor and do a find and replace for all instances of old domain/new domain.
posted by sio42 at 3:10 PM on November 10, 2011


Your site shouldn't be screwed up by any upload. The way I have often transferred big Wordpress SQL dumps is

1) Upload the .SQL file to the new place

2) Get into database controls, either through the webhost's DB management panel (mysql.yourdomain.com?) or the command line. I use those to tell it, "DB, import from this .SQL file that is sitting around with its list of commands to populate your DB and which otherwise just remains an inert text file that doesn't harm anything."

Often this works out best as a MySql command line thing you do. There is an example of how to do this in the WP Codex, I believe. Also, the people on the IRC help channel for #wordpress are really helpful.
posted by steinsaltz at 3:11 PM on November 10, 2011


>i open this in a text editor and do a find and replace for all instances of old domain/new domain.

Right, just do that. There aren't even that many, so no need to feel overwhelmed by it. There is a scattering of mentions, which correspond to the slots in the Wordpress control panel where you choose "Wordpress URL" and "Site URL."
posted by steinsaltz at 3:12 PM on November 10, 2011


i just did the find and replace. seems fine.

at the top are two lines:

CREATE DATABASE olddbname;
USE olddbname;

do i just put whatever we want to call the new db in there instead?
posted by sio42 at 3:14 PM on November 10, 2011


Ooh i might not touch that part. Not sure.
posted by steinsaltz at 3:15 PM on November 10, 2011


i have no way to get at the db for the new host right now.
mysql.newdomain.com didn't go anywhere or ask for a login or anything.

how would i get to the command line for it? i just have ftp access to it. and wordpress admin of course.

(strongly advising these people to never ever use these hosts again. geez.)
posted by sio42 at 3:15 PM on November 10, 2011


There's probably some easy way to figure out where this host offers SQL controls, hmm.

For SSH access (Dreamhost offers this, but your host might not :( ), open up your Mac Terminal (in Applications/Utilities) and type


ssh yourFTPlogin@yourdomain.com

See if it lets you in. Often times, though, hosts don't let you use the command line, or it is some switch you have to turn on in the site controls.
posted by steinsaltz at 3:18 PM on November 10, 2011


also: how about db.yourhost.com, sql.yourhost.com ?
posted by steinsaltz at 3:21 PM on November 10, 2011


says connection refused.

i know, it's crazy. i can't believe they don't have some sort of control panel that i or these people can access. i know i could kludge my way around if that was the case.

i'm not really using my domain etc right now. would any of this be easier if i uploaded the site to my host and then followed whatever procedures for moving the wp site? is that even possible at this point.
posted by sio42 at 3:21 PM on November 10, 2011


Sorry, confused, you mean if you uploaded the files to your new site?
posted by steinsaltz at 3:26 PM on November 10, 2011


Does your site control panel let you do stuff with the Users? Like grant yourself SSH powers?
posted by steinsaltz at 3:36 PM on November 10, 2011


no i mean. if i put the files on my personal site, would i be able to do all of this "transfer the site by following directions" thing or is it all too late?

my personal site has cpanel and stuff, but this new site/domain/host thing does not have anything like a user panel. it is baffling.
posted by sio42 at 3:40 PM on November 10, 2011


i'm just wondering if there's something i can do if i upload the site to my host that will make this transfer easier.
posted by sio42 at 3:42 PM on November 10, 2011


No, I think you're covered as far as the benefits you'd have gotten from that. The advantages there strictly involve preparing a nice SQL dump file, and if you have that, that's OK so far.

The one obstacle you face is this new hosting service being weird about letting you in on how to make databases. Somehow the people have to get back to you on how to let you do this.
posted by steinsaltz at 3:53 PM on November 10, 2011


are there other files i need to do the find and replace on?

also, when we picked the theme, all the changes that had been made are gone - the custom menu and the twitter widget etc. some changes are there but most are gone.

i thought all of this was in the files we downloaded. or it part of the database that it can't see for some reason?

so basically, i need access somehow to execute the sql script to create the db from the backup file. and then that should solve some of the problems. he'll have to call them in the morning. ugh.
posted by sio42 at 4:06 PM on November 10, 2011


btw thanks for all your help steinsaltz. part of the problem was figuring out what the problem was.
posted by sio42 at 4:08 PM on November 10, 2011


not sure if this makes a difference or if someone can tell me what it means, but my friend said he was watching a lynda video about wordpress and they moved a site, but the only part he couldn't do was exporting something from the dashboard. he said they didn't go into cpanel at all, it was all through wp-admin.

but he knows about as much as i do, so no idea what that's about or if that is a different scenario. if they weren't accessing cpanel or myPhpAdmin how did they move the db?
posted by sio42 at 4:20 PM on November 10, 2011


Here are *excellent* directions on how to move a Wordpress site & update the database with the new domain info. Once you figure out how to create a database on the new host & upload the dump you have from the old site, follow his directions.

As far as things like widgets & menus, you'll have to recreate them once you've set up the site & applied the template. And be sure to activate the twitter plugin. For some reason. WordPress doesn't keep the widget & menu info intact when you switch templates.
posted by belladonna at 4:43 PM on November 10, 2011


if they weren't accessing cpanel or myPhpAdmin how did they move the db?


They were probably just using the "export" tool from within WordPress's dashboard and then importing it into the new site. But since your original site is no longer live, that won't work for you.
posted by belladonna at 4:49 PM on November 10, 2011


ok, so code changes made to theme directly will be fine, but placement of widgets gets stripped out somehow? there was a custom header image, custom menus with css, a featured content plug in...is everything have to be recreated? i thought the point of moving a site was that all that stuff stayed.
posted by sio42 at 4:49 PM on November 10, 2011


never mind. thanks to all the help.

i'm going to try to convince these folks to use a different host who provides standard access to things like the db. so weird.

thanks again for all the help. at least i was able to narrow down the problem and learned a lot about phpmyadmin.
posted by sio42 at 7:53 PM on November 10, 2011


Yeah, once you go through the "fire" of Wordpress DB transfers, it will be smoother next time.

When it doesn't work, and especially when it is a small site without a lot of posts, I just do it by hand instead of bothering with a DB transfer: do the Wordpress export of posts and pages; go down the list of widgets and settings by hand and set them up to make sure they match.

I can't remember if the DB transfer method copies over the widget settings, I thought it did. I know they're not transferred over in the Wordpress post dump approach.
posted by steinsaltz at 2:54 PM on November 11, 2011


« Older Men's fashion filter: Where to...   |  Help me hack my living space o... Newer »
This thread is closed to new comments.