Title: How Can Import SQL Database?
Last modified: August 19, 2016

---

# How Can Import SQL Database?

 *  [mubashirrao](https://wordpress.org/support/users/mubashirrao/)
 * (@mubashirrao)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/)
 * Hi Everyone!
 * Yesterday night my website got hacked! 🙁 but i made a backup just before it 
   got hacked the backup i have was made by a plugin and thats in sql format. I 
   have that sql database and now i want to import it in my new wordpress blog on
   new host so i can show my posts and comments and images that i have in that database.
   I imported SQL database via phpMyAdmin but when i opened my blog there is no 
   post no image no comments either :(( so please any can help me about this? how
   do i show my posts, comments and images? or i am importing it wrong? there was
   successful message after importing database. I need Help! Please guyz help me
   out!

Viewing 9 replies - 16 through 24 (of 24 total)

[←](https://wordpress.org/support/topic/how-can-import-sql-database/?output_format=md)
[1](https://wordpress.org/support/topic/how-can-import-sql-database/?output_format=md)
2

 *  [kristel_ttm](https://wordpress.org/support/users/kristel_ttm/)
 * (@kristel_ttm)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/page/2/#post-1686918)
 * The imported tables have no prefix at all. And the wp-config.php points to wp_
   tables.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/page/2/#post-1686919)
 * They have no prefix? Just tables like `posts` and `users` ? Where did you export
   this database from?
 *  [kristel_ttm](https://wordpress.org/support/users/kristel_ttm/)
 * (@kristel_ttm)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/page/2/#post-1686920)
 * nope, no prefix at all indeed. I exported them from plesk / phpmyadmin of the
   old site. I assume they have been created this way (without prefix) by the guy
   who created the site a few years ago.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/page/2/#post-1686921)
 * What was the `$table_prefix` set to in the old site’s `wp-config.php` file?
 *  [kristel_ttm](https://wordpress.org/support/users/kristel_ttm/)
 * (@kristel_ttm)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/page/2/#post-1686922)
 * The old site was not wordpress. So I’m not sure if there was another kind of 
   config file pointing to the old database: [http://www.djpromo.nl](http://www.djpromo.nl)
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/page/2/#post-1686923)
 * You can’t import non-WordPress post tables into a WordPress database and expect
   them to just work. The database structures are probably completely different.
   You’ll have to import the posts, if possible. What was the original site built
   with?
 *  [kristel_ttm](https://wordpress.org/support/users/kristel_ttm/)
 * (@kristel_ttm)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/page/2/#post-1686924)
 * I’m not sure. it was a flash website I think.
 * Hence my idea to export without structure (in CSV) and import the data directly
   in the wp_post table.
 * Will give it a try at least.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/page/2/#post-1686925)
 * Try this plugin:
 * [http://wordpress.org/extend/plugins/csv-importer/](http://wordpress.org/extend/plugins/csv-importer/)
 * If that doesn’t work, refer to this for more options:
 * [http://codex.wordpress.org/Importing_Content](http://codex.wordpress.org/Importing_Content)
 *  [kristel_ttm](https://wordpress.org/support/users/kristel_ttm/)
 * (@kristel_ttm)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/page/2/#post-1686926)
 * Thank you very much James. I just tried the CSV importer but I get the following
   error:
 * _Skipped 245 posts (most likely due to empty title, body and excerpt).
    Imported
   0 posts and 0 comments in 0.20 seconds.
 * I will try the other method or modify my spreadsheet manually so that the column
   match the structure of wordpress.
 * Thank you again !

Viewing 9 replies - 16 through 24 (of 24 total)

[←](https://wordpress.org/support/topic/how-can-import-sql-database/?output_format=md)
[1](https://wordpress.org/support/topic/how-can-import-sql-database/?output_format=md)
2

The topic ‘How Can Import SQL Database?’ is closed to new replies.

## Tags

 * [Comments](https://wordpress.org/support/topic-tag/comments/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [images](https://wordpress.org/support/topic-tag/images/)
 * [Import](https://wordpress.org/support/topic-tag/import/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)
 * [sql-error](https://wordpress.org/support/topic-tag/sql-error/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 24 replies
 * 4 participants
 * Last reply from: [kristel_ttm](https://wordpress.org/support/users/kristel_ttm/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/page/2/#post-1686926)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
