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 15 replies - 1 through 15 (of 24 total)

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

 *  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/#post-1686614)
 * First, follow this guide:
 * [http://codex.wordpress.org/Restoring_Your_Database_From_Backup](http://codex.wordpress.org/Restoring_Your_Database_From_Backup)
 * If you’re still having trouble, make sure that your `wp-config.php` file is pointed
   at the right database.
 *  Thread Starter [mubashirrao](https://wordpress.org/support/users/mubashirrao/)
 * (@mubashirrao)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/#post-1686619)
 * actually my problem is that i can import my database but posts, images and comments
   are not showing? how do i do that? everything goes ok but it doesnt show my content..
   🙁
 *  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/#post-1686629)
 * Are there any posts in the `wp_posts` table?
 *  Thread Starter [mubashirrao](https://wordpress.org/support/users/mubashirrao/)
 * (@mubashirrao)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/#post-1686668)
 * yeah there are many posts….
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/how-can-import-sql-database/#post-1686684)
 * Is your current install using the same version of WP as your old site?
 *  [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/#post-1686900)
 * Hi, I’m having the same issue here. I have made an import of my old site’s database
   using phpmyadmin (like explained in here: [http://codex.wordpress.org/Restoring_Your_Database_From_Backup](http://codex.wordpress.org/Restoring_Your_Database_From_Backup))
   
   I did not get any error and I can see my imported tables but no posts are appearing.
   wp-config.php file is pointing at the correct database.
 * What do I need to do next for the post to be showing ? Do I need to rename the
   imported tables with a wp_ prefix ? It seems that does not do the trick.
 * Thank you for your help !
 *  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/#post-1686903)
 * > Do I need to rename the imported tables with a wp_ prefix ?
 * No, but you should set your `wp-config.php` file to use whatever prefix the tables
   are using.
 * [http://codex.wordpress.org/Editing_wp-config.php#table_prefix](http://codex.wordpress.org/Editing_wp-config.php#table_prefix)
 * If that doesn’t work for you, please start your own topic.
 *  [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/#post-1686904)
 * Mmm, but the thing is that I have some tables with wp_ prefix and some (imported)
   without prefix. I added the wp_ prefix to the imported ones but I still have 
   no posts appearing on the blog.
 * What I would like is the data of the imported tables to show on the blog as new
   posts.
 *  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/#post-1686911)
 * Was this a complete database import, or did you just import a few tables from
   another database?
 *  [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/#post-1686912)
 * Just 3 tables actually.
 *  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/#post-1686913)
 * That’s the problem. The tables are very interconnected, so we really can’t recommend
   importing specific tables.
 *  [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/#post-1686914)
 * I also tried to import the whole database but I had the same problem. There were
   no new posts showing.
 * Is it an idea to try to import the data only (no structure) from a CSV file directly
   into the original wp_posts table ?
 *  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/#post-1686915)
 * Well, let’s go back to restoring the full database. Can you restore the full 
   database, not just a few tables, and then provide a link to the blog so we can
   see what’s going on?
 *  [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/#post-1686916)
 * Sure. I just re-exported the whole database of the old site. And successfully
   re-imported it in the wordpress database. Do I need to rename the tables with
   the wp_ prefix ? This part is not clear to me.
 * The blog is [http://www.djpromo.nl/wordpress](http://www.djpromo.nl/wordpress)
 *  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/#post-1686917)
 * > Do I need to rename the tables with the wp_ prefix ?
 * What is the table prefix now, and what does your `wp-config.php` file say at `
   $table_prefix` ?

Viewing 15 replies - 1 through 15 (of 24 total)

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

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
