Solved

Creating a database from excel for a wordpress site

Posted on 2014-11-10
6
224 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now