WordPress: Problems importing localhost database to live site

I’m hoping someone can help me with this issue. I am trying to take a working wordpress site from WAMP and move it onto a live domain. I’ve already setup the hosting and everything and followed the instructions on exporting my current database to file and importing it through phpmyadmin on domain.com cpanel.

I am receiving the following error upon import: #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’

Read More

I was receiving error #1064 before that, but after deleting a few lines of code at the top, It changed to this error. I’m assuming the problem might have to do with config.php, or perhaps having different versions?

Here is what I have in my .sql file I am trying to import at the top:

-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 02, 2015 at 08:46 PM
-- Server version: 5.6.17
-- PHP Version: 5.5.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

I am very new to setting up wordpress sites as well as using databases so if there is other information you need to help me fix this, please ask and I will get it. If I have not provided enough info, I apologize, I’m just not sure where I should be looking and could really use some advice.

Thanks in advance to anyone who reads this.
– Barret

Edit: This might also be useful information

USE pubz_glass_db;

CREATE TABLE IF NOT EXISTS `1441208560942_wp_commentmeta` (
`meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`comment_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`meta_value` longtext COLLATE utf8mb4_unicode_ci,
 PRIMARY KEY (`meta_id`),
 KEY `comment_id` (`comment_id`),
 KEY `meta_key` (`meta_key`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci         AUTO_INCREMENT=1 ;

Related posts

1 comment

  1. When you install new, fresh WordPress it automatically create default article etc. so when you try to import old database there is conflict of id’s. Before importing old database you should DROP or at least TRUNCATE all tables created by WordPress after installation on your hosting.

Comments are closed.