Title: SQL Error  Trying To Import Posts
Last modified: August 20, 2016

---

# SQL Error Trying To Import Posts

 *  Resolved [GatoGordo](https://wordpress.org/support/users/gatogordo/)
 * (@gatogordo)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sql-error-trying-to-import-posts/)
 * I’m relatively new to the platform, trying to export and import (via phpMyAdmin)
   a WordPress site on BlueHost’s servers for local development. All the database
   tables seem to be exporting fine except _wp-posts_, which generates this MySQL
   error:
 * >  <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt](http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt);
   > <html xmlns=”[http://www.w3.org/1999/xhtml&#8221](http://www.w3.org/1999/xhtml&#8221);
   > xml:lang=”en” lang=”en” dir=”ltr”> <head> <meta http-equiv=”Content-Type” content
   > =”text/html; charset=utf-8″ /> <link rel=”icon” href=”./favicon.ico” type=”
   > image/x-icon” /> <link rel=”shortcut icon” href=”./favicon.ico” type=”image/
   > x-icon” /> <title>phpMyAdmin</title> <link rel=”stylesheet” type=”text/css”
   > href=”phpmyadmin.css.php?server=1&token=6c15efb9727c32996dd34552f7011e4c&js_frame
   > =right&nocache=5388229951″ /> <link rel=”stylesheet” type=”text/css” href=”
   > print.css” media=”print” /> <link rel=”stylesheet” type=”text/css” href=”./
   > themes/pmahomme/jquery/jquery-ui-1.8.custom.css” /> <meta name=”robots” content
   > =”noindex,nofollow” /> <script src=”./js/cross_framing_protection.js?ts=1344778698″
   > type=”text/javascript”></script> <script src=”./js/jquery/jquery-1.4.4.js?ts
   > =1344778[…]
   > MySQL said: Documentation
   >  #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 ‘<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”“
   > [http://www.w&#8217](http://www.w&#8217); at line 1
 * Any thoughts on what the right fix is?

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

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sql-error-trying-to-import-posts/#post-3122088)
 * What you show is not an sql export, it is an HTML document. You should try the
   export again.
 *  Thread Starter [GatoGordo](https://wordpress.org/support/users/gatogordo/)
 * (@gatogordo)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sql-error-trying-to-import-posts/#post-3122093)
 * Thanks, re-exporting and importing the table structured it correctly and produced
   no errors.
 * The locally hosted version of the site is still broken (can’t access anything
   beyond front-page content), but that seems to be a separate problem and will 
   call for a different support thread..
 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sql-error-trying-to-import-posts/#post-3122096)
 * That was probably caused by embedded links and paths in the database. Here is
   an article with the steps that I use to migrate a site:
    [http://wordpress.mcdspot.com/2012/08/22/migrating-a-wordpress-site-step-by-step/](http://wordpress.mcdspot.com/2012/08/22/migrating-a-wordpress-site-step-by-step/)
 *  Thread Starter [GatoGordo](https://wordpress.org/support/users/gatogordo/)
 * (@gatogordo)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sql-error-trying-to-import-posts/#post-3122098)
 * Thanks for your comment and link.
 * I had run this script to try to take care of that potential problem:
 * [http://interconnectit.com/124/search-and-replace-for-wordpress-databases/](http://interconnectit.com/124/search-and-replace-for-wordpress-databases/)
 * Will try the Migrate DB Plugin.
 *  [pk2516](https://wordpress.org/support/users/pk2516/)
 * (@pk2516)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sql-error-trying-to-import-posts/#post-3122186)
 * i have same problem after try to import MySQL database file
    and I got this messages
 * ERROR: Unknown Punctuation String @ 1
    STR: <? SQL: <?php /** * The base configurations
   of the WordPress. * * This file has the following configurations: MySQL settings,
   Table Prefix, * Secret Keys, WordPress Language, and ABSPATH. You can find more
   information * by visiting {@link [http://codex.wordpress.org/Editing_wp-config.php](http://codex.wordpress.org/Editing_wp-config.php)
   Editing * wp-config.php} Codex page. You can get the MySQL settings from your
   web host. * * This file is used by the wp-config.php creation script during the*
   installation. You don’t have to use the web site, you can just copy this file*
   to “wp-config.php” and fill in the values. * * [@package](https://wordpress.org/support/users/package/)
   WordPress */
 * // ** MySQL settings – You can get this info from your web host ** //
    /** The
   name of the database for WordPress */ define(‘DB_NAME’, ‘wrd_dm2gggaijo’);
 * SQL query:
 * MySQL said: Documentation
    #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 ‘<?php
 * // ** MySQL settings – You can get this info from your web host ** //’ at line
   1
 * If check from server information MySQL version is 4.1.22
    but if look from Cpanel
   system settings MySQL version is 5.0.91 what can i do with this, I am very new
   to this stuff please someone help me thanks for any help
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/sql-error-trying-to-import-posts/#post-3122187)
 * Please [post your own topic](http://wordpress.org/support/forum/how-to-and-troubleshooting#postform).
   Your problem – despite any similarity in symptoms – is likely to be completely
   different.

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

The topic ‘SQL Error Trying To Import Posts’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [exporting](https://wordpress.org/support/topic-tag/exporting/)
 * [importing](https://wordpress.org/support/topic-tag/importing/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 4 participants
 * Last reply from: [esmi](https://wordpress.org/support/users/esmi/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/sql-error-trying-to-import-posts/#post-3122187)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
