i am creating a wp site with product listing.They have an old php site.There are around 2000 products listed in that site.
In the new Wp site the products will added as a custom post type with 3-5 custom fields.
How can i write a query to import the data from the old mysql db to the current wp site
There are a million ways to do it.. export the products into a csv and then import that, or import it into a wp plugin for ecommerce, write a stored procedure, set up a cron to run a manual insert at night..
Thank you Andrew.
But the old site is not wordpress, how can i transfer data from a normal mysql table (products_table) into the wordpress posts table .
Suppose the product image is added in the old site in the field product_image of products_table i will need to add this to a custom field
of that products post(I have created a custom post type products)
Well, you’d have to learn the database structure of WordPress so that you can replicate it. Is this for a client or for your own site?
This is for a client.
How can i learn the database structure.Can i get a sample insert code from somewhere
Load the thing up in mysql workbench and take a look. I started here.
thank you Andrew . i will try with this