Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Creating a database from excel for a wordpress site

Posted on 2014-11-10
6
Medium Priority
?
289 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 36

Assisted Solution

by:Kimputer
Kimputer earned 2000 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 36

Accepted Solution

by:
Kimputer earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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 …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

722 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