0

I have a few hundred rows of product data that is going to be displayed as posts on the wordpress site. I'm sure there's a way I can load all this data directly into the database and then have both the admin & frontend UIs populate with these as new posts. But from what I can tell, various aspects of a post are populated/stored in different tables. Which tables should I load this data into to avoid having to create each one manually from the admin UI?

0

I'm not sure of having understood what you are asking for. But if my guess is correct, you can achieve this goal by using $wpdb global variable.

But, in order to be more specific, I need to know how and when you want the database to update those informations.

  • Sorry for not being clear on the question @Luigi. Let's say for example I have the a csv file like this: Name Image Description prod1 www.url.com/image.jpg the description is long blob of text In the above example, the name would need to be the post's title, image would need to be the featured image, and description would be the actual post content itself. So I'm looking for a way to load this csv into the various mysql tables that store post data so that I don't have to manually create each post since there's hundreds. – ivdezine Feb 13 '18 at 11:36
0

I found this after some additional searching and it seems like one of the plugins suggested here will work for what I'm trying to do.

Importing data from spreadsheet into wordpress DB, along with custom taxonomies and their terms

The 2 options given there are:

  1. CSV Importer
  2. Turbo CSV

I'm going to give these a try and will post back here if they work.

0

Just an update - the plugins linked above weren't compatible with my version of wordpress but I just searched the plugin directory and found Ultimate CSV Importer and it worked perfectly for what I needed to do. I guess I should've tried looking for a plugin first instead of trying to load manually myself.

Here's the link for the plugin I used:

https://wordpress.org/plugins/wp-ultimate-csv-importer/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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