[Wordpress] How to Generate Bulk Content Based On Data ? (Stored in DB or CSV)

GVald

Power Member
Joined
Mar 28, 2020
Messages
669
Reaction score
778
This is NOT a Tutorial, I'm looking for people that done it to give me some insight!


Hello guys,

So I have a project, I need to generate a lot of pages (like A LOT) on WordPress, based on data stored in a CSV (I will put the CSV data into SQL format, so I can make a database, I believe that would make thing easier from the start). I checked the forum for this type of stuff, I found people that have done it, but no one that explain how to do it, I'm not looking for A to Z tutorial, just some direction to go into.

Let's pretend that's the table:

idnamenbr (Number person having that name)
1Alex100 000
2Robert60 000
3Louis215 000

So I would like to create one page per name, and show data (sql fetch), how do that on auto pilot, like I make one template with the variable, and with a foreach automate the process for the rest of the database.

"The name $name is used by $nbr person in the US" -> That would make 3 pages, one for Alex, one for Robert, and one for Louis. Of course, this is very basic, that's just to show what I would like to do.

I have knowledge in PHP and SQL, but not really on WordPress (dev side), it looks like Laravel a little bit from what I've seen, which I have some basic knowledge. Also, if there's a plugin that do such thing, I'm interested!

Thanks for reading, hope some people here can help!
 
I don't know if there is an existing plugin for this. But you can write a content generator script and do a bulk import.
 
Dude, get out of my brain! I've been researching this exact same ask for the past few days.

I've got close to a million records in a CSV. Would like to build a directory out of those records and integrate it into my existing WordPress site. (As an added bonus, I'd like a form to push data to the MySQL database to update said pages so I can have users in the directory update their profiles. Programmatic SEO + user-generated content.)

From what I've gathered:
  1. WordPress posts are stored in a MySQL database;
  2. It's possible to set up custom taxonomies/post types to keep the imported posts separate from regular blog posts. (For my directory purposes, I'd rather the directory and its subcategories be separate from the blog posts.)
  3. It's possible to set up a GravityForm to write to a (the?) MySQL database to give the end users an easier way to edit their profiles.
I'd also like to format the content mail merge-style ... $B1 is a $C1 plan which carries (if $C1: these features - that's probably simple content script.
 
Eh I think rather than automating creating the page, you can convert your CSV into wp_post table schema. From there you can just load the SQL and in theory the pages will be automatically generated
 
You need a custom php script to insert the data into wp_post table. Then run it automatically every xx minutes/hours/days using cronjob.
 
Back
Top