[wp-hackers] Mass-Import Process to run in background

Jaime Martínez list at jaimemartinez.nl
Thu Apr 24 17:23:06 UTC 2014


Hi Alex,

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.

Ciao,

Jaime

> 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?
> 
> Thanks,
> Alex
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list