I have a simple web application that let’s a user enter a directory name into a text box and choose a theme to set as the default theme from a group of radio buttons. Once clicking the submit button, a script creates the directory for the wordpress site. The user simply needs to go to the url (http://ip_address/directory_name) and complete the install (site name, admin password, etc).
What I would like to do is to have the sample data for a particular theme loading by default as well. Everything that I have seen so far is using the importer plugin, but that would require the user to log in and upload the sample data xml file. I want the sample data to be in place automatically like the default theme is. Any suggestions?
(I have the sites hosted on a linux ec2 server and using CGI, perl, and bash scripts)
I decided to do an sql dump of the theme with the sample data in place. I then can restore the new database with this dump file and voila sample data in place.
I did something a bit different, but perhaps people searching for importing data into WP without Importer tool might find this useful. The function basically parses the XML and creates a new post: https://stackoverflow.com/a/19931185/2066118