Connecting to PhpMyAdmin & Transferring Wordpress


#1

Greetings!

I’m trying to transfer a Wordpress from a subdomain to its own domain and it’s honestly proving more difficult than I’d hoped. (Note, I’m looking here: http://codex.wordpress.org/Moving_WordPress#Moving_to_a_New_Server).

It says to use PhpMyAdmin to backup and restore to a new database, while changing the domain within the wp-config.php file. My problem is, I use the name of the user/pass that has rights to the database, but it doesn’t allow me past the most immediate log-in page when I click on PhpMyAdmin (in the MySQL database section).

Is there another user/pass I ought to be using? I used the one-click install, so I didn’t create the user when it was created.

Any and all advice is greatly appreciated. I really need this done soon.

Thanks!
[hr]
I managed to connect to the database and back it up. I guess it took a bit for the password to update on the DH end.

I’ll be honest, though, for as simple a task as this seems (and I’m sure is), I’m finding it rather overwhelming — largely due to the fact that everything breaks in the process. I really wish there was something better than a: “Hey! Transfer is easy! Just do these conceptual things!” An straight-forward, walk-through example would be greatly appreciated, if someone knows of one.

Thanks!


#2

In theory, everything’s easy. When you don’t know anything, it’s confusing. Just remember, you’re learning something new, and while we do try to make the process as simple as possible, there are a lot of variables that the official WP docs can’t account for :slight_smile:

So okay, moving from a subdomain in DreamHost to the main domain isn’t so terrible. Since you’re on the same server, you can actually leave the DB where it is!

  1. Backup data (because that’s just smart :wink: )
  2. Copy the files from subdomain.domain.com to domain.com
  3. On subdomain.domain.com/wp-admin, change your home and site URL to domain.com
  4. Go to domain.com/wp-admin and log in

That should be it. The only thing extra to do would be to search your _posts table for subdomain.domain.com and replace with domain.com to correct links. If you’re SQL savvy its just this:

UPDATE wp_posts SET post_content = REPLACE (
post_content,
'sub.domain.com',
'domain.com');

Otherwise, there are some search and replace plugins that can help you, just make sure to only change the post content :slight_smile: The rest you don’t have to worry about.


#3

Hello Ipstenu-DH,

Thanks for the explanation! I actually ended up figuring out, more or less, but it’s good to see I did most of it right. One step I couldn’t figure out, so I probably did it sloppily, is how to copy the directories! Is there really no way to copy a directory to another via FTP? I don’t have a fast connection, so downloading the whole bit, just to turn around and upload it sounded like a poor sport. Instead I swapped directory names, changed the wp-config.php — including adding define(‘RELOCATE’,true); — and logged in.

After that I did the UPDATE on the post_content.

So, most importantly, I don’t appear to have forgotten or botched a step (too badly). Hahah! This is one of those, “I’m a developer, dang it! I program things for a living! Why is this so difficult!” But you’re right: I’m learning. :slight_smile:

Thanks, again, for your help!


#4

If you have the same userID owning both subdomain.domain.com and domain.com, you can do CP via command line. IIRC, go into domain.com and type: