WordPress.org

Forums

CSV Importer
Slow Import ans Solution... (4 posts)

  1. ghalleb
    Member
    Posted 1 year ago #

    I found importing posts was very slow. I could only import 1000 posts before having a time out.

    I took a look closely to wordpress code and discovered that adding this line could give a hude optimization:

    wp_defer_term_counting( true );
    wp_defer_comment_counting( true );

    Put that in your function file for example. But then, don't forget to remove it, or add this after you are done(just to be sure):

    wp_defer_term_counting( false );
    wp_defer_comment_counting( false );

    I hope it will help someone!

    https://wordpress.org/plugins/csv-importer/

  2. BigDogSF
    Member
    Posted 10 months ago #

    Hi...tried this, saw no difference. I'm wondering if it is due to the fact that I am importing to a custom post type.? Or placed in wrong file...I put it in the theme functions.php.

    Any thoughts?

  3. ghalleb
    Member
    Posted 7 months ago #

    Sorry for the late answer...

    I'm importing to a customn post type too.

    With this 2 lines, importing was like 20x faster.

    Check if there is not this lines anywhere else or try to put them in several files like functions.php or in the plugin itself....

  4. pmconsulting
    Member
    Posted 4 months ago #

    Probably requires a server restart.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • CSV Importer
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.