Title: Moving Hosts
Last modified: August 19, 2016

---

# Moving Hosts

 *  [largestew](https://wordpress.org/support/users/largestew/)
 * (@largestew)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/moving-hosts-2/)
 * I’ve recently moved a site from one host to another, and I’m completely new at
   wordpress. According to the [http://codex.wordpress.org/Moving_WordPress](http://codex.wordpress.org/Moving_WordPress)
   it appears that I should just be able to download the site, upload it to the 
   new server and it should work, however it didn’t work out that way, I got unable
   to establish a database connection. I’m having trouble finding what the database
   would be, all I have from the other host is a database.txt file that appears 
   to have the text of the posts inside it, however I do have all the folders, images,
   etc that was in the blog folder.
    So, I setup a new database and have edited 
   the wp-config file to point to it. Is there a way to import the posts from the
   txt file and restore the full blog to how it was before?
 * Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/moving-hosts-2/#post-1970790)
 * [http://codex.wordpress.org/Restoring_Your_Database_From_Backup](http://codex.wordpress.org/Restoring_Your_Database_From_Backup)
 *  Thread Starter [largestew](https://wordpress.org/support/users/largestew/)
 * (@largestew)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/moving-hosts-2/#post-1970902)
 * Thanks esmi. Again, I’m very green at this, all I know how to do is install worpress
   with fantastico, login, do posts, and customize templates, so I’m completely 
   out of my element when dealing with databases. I could completely be doing something
   wrong. When I tried importing using phpmyadmin this is what I’ve gotten:
 * Error
    There is a chance that you may have found a bug in the SQL parser. Please
   examine your query closely, and check that the quotes are correct and not mis-
   matched. Other possible failure causes may be that you are uploading a file with
   binary outside of a quoted text area. You can also try your query on the MySQL
   command line interface. The MySQL server error output below, if there is any,
   may also help you in diagnosing the problem. If you still have problems or if
   the parser fails where the command line interface succeeds, please reduce your
   SQL query input to the single query that causes problems, and submit a bug report
   with the data chunk in the CUT section below: —-BEGIN CUT—- eNrtzc1ugkAUBWDW8xR3YbpiJsyMtGVcTQy1JvyVsS66s5amJICokNS3L5q
   +hMnZ3Xz35Jy4LPPS 0FLSUlESZ4ZCeqS5VJq5zfTwGHPbSWfrL0PnY9PvTufqJJr6U/Q/PUkt5ROpIIi4lFyGE5gwMFp9
   UFO1Ec1YenFvydQqAhFJvj+07djVw4W9u5Jy55NdxdnGp208jaW7PTn7Ysv1LR9qzYrUGtJCiTkr 
   XotrzM/dtU6JiJK6G39ZYrOVoarj4/DNn9lt7uE4HoaFJ73/YwEAAAAAAAAAAAAAAAAAAAAAAAAA 
   AAAAAAAAAAAAAAAAAMC9wx/y8STN —-END CUT—- —-BEGIN RAW—- ERROR: C1 C2 LEN: 5 6 
   4123 STR:
 * SVN: $Id: sqlparser.lib.php 13117 2009-11-15 13:50:32Z lem9 $
    MySQL: 5.0.91-
   community USR OS, AGENT, VER: Mac SAFARI 5.0.533 PMA: 3.2.4 PHP VER,OS: 5.2.9
   Linux LANG: en-utf-8 SQL: “1”;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”
   1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″;”1″; —-END RAW—-
 * SQL query:
 * “1”;
 * MySQL said:
 * #1064 – You have an error in your SQL syntax; check the manual that corresponds
   to your MySQL server version for the right syntax to use near ‘”‘ at line 1
 *  [arkgroup](https://wordpress.org/support/users/arkgroup/)
 * (@arkgroup)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/moving-hosts-2/#post-1970906)
 * largestew,
 * To move wordpress blog, you need to copy all the wordpress files from old host
   to new host, to export your database from old host with phpMyAdmin, create new
   database on new host and import your database there. After that you’ll need to
   change database info in wp-config.php. Then you’ll need to change DNS for your
   domain name and in 24-72 hours your website will be up and running at new host.
 *  Thread Starter [largestew](https://wordpress.org/support/users/largestew/)
 * (@largestew)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/moving-hosts-2/#post-1970908)
 * Thanks so much arkgroup. You are affirming that I’ve done everything right so
   far.
 * We moved hosts at the end of February, and everything is great except for the
   blog portion. I never had access to the old servers, the company’s designers &
   techs did it all. They sent me a zip file that when expanded had everything in
   it. I edited the site and uploaded it onto the new server, created a new wordpress
   installation, copied all the files from the folder I was sent. I have installed
   the template. So everything is working great except for the database content 
   from the blog prior to the move. If I had access to their servers I’m pretty 
   sure I would have been able to do the export (either in wordpress or phpmyadmin)
   and the import would have worked fine. However, I don’t know how they exported
   the database. (I’ve asked, but haven’t gotten a reply). What they sent me was
   a file named database.txt which I can’t get to import into wordpress, and when
   I try to import into mysql I get the syntax error.
 * Does anyone know how you would export a worpress database so that it’s exported
   as a text file? And more importantly, how to import that text file into a new
   wordpress installation?
 *  [arkgroup](https://wordpress.org/support/users/arkgroup/)
 * (@arkgroup)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/moving-hosts-2/#post-1970927)
 * largestew,
 * I suppose database.txt file is corrupt or tech guys exported it in some strange
   way. What you need is sql file of all the wordpress tables (not the database 
   itself, because 99% host allows to create databases from control panel and not
   from phpMyAdmin). Then it is possible to import it to existing empty database.
   You don’t need actually install wordpress on new host. All the information already
   should be in your sql file (except SiteURL, you’ll need to change it from phpMyAdmin
   too, after you import all the wordpress tables).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Moving Hosts’ is closed to new replies.

## Tags

 * [moving-wordpress](https://wordpress.org/support/topic-tag/moving-wordpress/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 5 replies
 * 3 participants
 * Last reply from: [arkgroup](https://wordpress.org/support/users/arkgroup/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/moving-hosts-2/#post-1970927)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
