import

Here is a simple method that you can use to import news, posts or content from a text file into WordPress. This script assumes the text data file has each post on a separate line with fields separated by a |. This is how most flat file news scripts store data. It also uses the php tidy extension to clean the input before inserting into the database. If you need to import data from a different source, all you need to do is include the wp-load.php script and use wp_insert_post to insert post.

Copy to Clipboard

About Author:

Kalpesh Chavada

Kalpesh Chavada is Our Founder & CEO of Akshar Group Technologies. He is serving with 11+ years of experience in different technologies like Magento, WordPress, Laravel, jQuery, Shopify, Branding, and Digital Marketing. He is very good with creative logic and always ready to take on challenges.

Kalpesh Author