Solved

Creating a database from excel for a wordpress site

Posted on 2014-11-10
6
243 Views
Last Modified: 2014-12-05
I would like to create a site like getapp, software advice, capterra, toptenreviews.

I have crawled the list of URLs on these sites to get a better understanding on how the site is structured.

I have sorted out the types of pages (vendor profile pages, category pages, search results page, alternative to page, comparison page, etc). I have a list of vendors for each category and a list of tags.  I have the entire list of URLs/pages and have grouped them according to the type of page.

I think wordpress might be the best solution to go for here. I would like to customize wordpress to make it do what is needed here.

I do have a few themes and plugins that would help out (like reviews, listings, comparisons, ratings, etc).

I have the entire database ready for use in an excel file.

A lot of these sites don't really have detailed information on these vendors. I went to each of the vendor's site and make sure that I got every single feature they have and more detailed info. I made a very through profile and comparison.

I would like to use this excel file for creating the backend (database) of the site that I am going to build.

How do I turn this into a database that can be used for a wordpress site?
0
Comment
Question by:smuralisankar
  • 2
  • 2
6 Comments
 
LVL 35

Assisted Solution

by:Kimputer
Kimputer earned 500 total points
ID: 40432378
First get to know the database in wordpress (which one you need, what the current layout is). Then get the table/columns correct in excel (include header), then export in .csv file. In PHPMyAdmin import this csv file into your database table.
0
 

Author Comment

by:smuralisankar
ID: 40432392
First get to know the database in wordpress (which one you need, what the current layout is).

What do you mean? What do I have to know?

The database is a mysql database.

Then get the table/columns correct in excel (include header), then export in .csv file.

When you say correct in excel, is there anything specifc that I have to do for this like best practices, precautions, naming conventions, etc?
0
 
LVL 35

Accepted Solution

by:
Kimputer earned 500 total points
ID: 40432458
You think wordpress is a simple database, but it's not. It contains tens if not hundreds of tables. What you're trying to import, has to fit in the correct table, otherwise it's no use to import it in the first way. That's why I said you need to know which table you need, and what the column layout is. If you don't know, it's no use. It has no meaning to wordpress (and can have disastrous effect). After you know the database/table you need, and you know what it all means, you can try to make sense of it and build your excel file.

Here's for example a most common wordpress posts table:

CREATE TABLE `wp_posts` (
	`ID` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
	`post_author` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
	`post_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
	`post_content` LONGTEXT NOT NULL,
	`post_title` TEXT NOT NULL,
	`post_category` INT(4) NOT NULL DEFAULT '0',
	`post_excerpt` TEXT NOT NULL,
	`post_status` VARCHAR(20) NOT NULL DEFAULT 'publish',
	`comment_status` VARCHAR(20) NOT NULL DEFAULT 'open',
	`ping_status` VARCHAR(20) NOT NULL DEFAULT 'open',
	`post_password` VARCHAR(20) NOT NULL DEFAULT '',
	`post_lon` FLOAT NULL DEFAULT NULL,
	`post_lat` FLOAT NULL DEFAULT NULL,
	`post_date_gmt` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
	`post_name` VARCHAR(200) NOT NULL DEFAULT '',
	`to_ping` TEXT NOT NULL,
	`pinged` TEXT NOT NULL,
	`post_modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
	`post_modified_gmt` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
	`post_content_filtered` LONGTEXT NOT NULL,
	`post_parent` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
	`guid` VARCHAR(255) NOT NULL DEFAULT '',
	`menu_order` INT(11) NOT NULL DEFAULT '0',
	`post_type` VARCHAR(20) NOT NULL DEFAULT 'post',
	`post_mime_type` VARCHAR(100) NOT NULL DEFAULT '',
	`comment_count` BIGINT(20) NOT NULL DEFAULT '0',
	PRIMARY KEY (`ID`),
	INDEX `post_name` (`post_name`),
	INDEX `post_status` (`post_status`),
	INDEX `type_status_date` (`post_type`, `post_status`, `post_date`, `ID`),
	INDEX `post_parent` (`post_parent`),
	INDEX `post_author` (`post_author`)
)
COLLATE='latin1_swedish_ci'
ENGINE=MyISAM
AUTO_INCREMENT=1800;

Open in new window


So make the headers in your excel, and fill it with your data, matching the types (text/numbers/etc) and contraints (max 20 chars etc?), then try the import, and hope it doesn't fail (because of wrong type/constraint/data).
This is just an examle! The table you need might look totally different. You need to fully understand your database, otherwise it's no use. A database doesn't magically know what you want or need. As you are using various plugins and themes, they might use other tables to put their data in. I cannot know where you need to put the relevant data.
Maybe it's best you look at the plugins and see if they have specific import functions, that would make more sense than you importing it straight into the database.
0
 

Author Comment

by:smuralisankar
ID: 40432972
No. It is not a duplicate. The explanation of the project is the same since it is the same project. But please check the end of the question. One deals with the importing of data from a CSV and creating a database. The other deals with bulk creation of pages based on data (csv or database).
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question