Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have been importing data records as posts with custom meta data directly into Wordpress via the CSV Importer plugin. It works okay, however, there are some issues with it.

Issues:

1) It takes countless hours to import massive amounts of records (I have spent dozens of hours importing about 5,000 records, and still have about 150,000 records to go).

2) The plugin isn't supported anymore, so I have no idea of it's stability.

My hope is that I can find a way to import these records that are in csv format into phpmyadmin directly.

Here is what the posts contain...

Post title Post content plus about 8 custom fields (which I make visible through some script that I add to the single-post.php file for my theme).

So....does anyone know how to import these posts through phpmyadmin, so that I don't have to rely on a plugin to pull them into wordpress, which then inputs them into my mysql database and back into wordpress?

I'd rather just import them directly into phpmyadmin which would shoot them directly into mysql, which I would think is the more intelligent and effective way to do things anyhow.

Thanks in advance for anyone's input on this. I am much appreciative.

share|improve this question
add comment

1 Answer

Not exactly a WP question, but :

The answer depends also on WHERE your cvs came from and what created it , and how the data is arranged .

If the CVS data CAME FROM SQL DUMP , you just need to use the import command in phpmyadmin... very easy.

If the CVS came from another source (say - excel for example) The direct answer is that To import a cvs into MYSQL you should use LOAD DATA LOCAL INFILE

LOAD DATA LOCAL INFILE '/yourfilename.csv'
INTO TABLE test_table
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
(field1, filed2, field3); 

This sql command will work only on LOCAL MACHINE . to import from other places you will need a script to break it up into an array in which each line is a row of data and split each line up by the delimiter character to inject.

share|improve this answer
    
Thanks 4 ur reply.... the spreadsheet is of a directory with different columns that designate everything from post_title to post_content to different custom fields. I was using CSV Importer, but the problem is that it takes hours upon hours to upload thousands at a time and I need to import about 150,000 or so records to be displayed as posts. I am using the custom fields to display the info such as address, phone, etc. I can display custom fields properly, but the importing has been a real hassle. I'm trying to bypass wp plugins as they don't meet my needs. Any ideas? Thanks in advance. –  vegaskev Feb 9 '12 at 5:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.