[wp-hackers] Mass-Import Process to run in background
list at jaimemartinez.nl
Thu Apr 24 17:23:06 UTC 2014
I sugest you use http://wp-cli.org and look at existing code like the wp user import-csv, wp post create or wp media regenerate for inspiration.
You can create an custom command that runs your code from the commandline. No time-outs :)
Saves time building an interface.
> On 23 apr. 2014, at 18:32, Alex Hempton-Smith <hempsworth at gmail.com> wrote:
> Hi all,
> I have large amounts of CSV data (around about 7k rows) to import, each row
> being a new post (CPT) and various meta fields.
> I can open and print out the contents of the file to the browser fine, but
> I just know running that import will time-out.
> Within a WordPress plugin, how do a run a large process like that? And even
> better, provide some kind of 'percentage complete' feedback to the user?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers