Title: Skipping posts while import and cause server error
Last modified: April 1, 2021

---

# Skipping posts while import and cause server error

 *  Resolved [dchero](https://wordpress.org/support/users/dchero/)
 * (@dchero)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/skipping-posts-while-import-and-cause-server-error/)
 * Hello. I have been using this plugin for about 2 years but I am facing serious
   problems lately. I hope you can help me.
 * I had no problem transferring 100’s of lines of CSV files, but although there
   were only 20 lines in my last import, it just created 2 posts and skipped the
   rest and the process ended. At the end of this process it consumed all the resources
   of the server and gave “database connection error” and shut down my website. 
   I already followed some of your error solutions, like lowering the iteration 
   to 1.
 * Have you encountered an error like this?
    If you are faced with such a situation,
   I expect all kinds of help.
 * Edit: I don’t have the same issue on a localhost environment.
    -  This topic was modified 5 years, 2 months ago by [dchero](https://wordpress.org/support/users/dchero/).
    -  This topic was modified 5 years, 2 months ago by [dchero](https://wordpress.org/support/users/dchero/).
    -  This topic was modified 5 years, 2 months ago by [dchero](https://wordpress.org/support/users/dchero/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/skipping-posts-while-import-and-cause-server-error/#post-14290428)
 * Hi [@dchero](https://wordpress.org/support/users/dchero/),
 * > but although there were only 20 lines in my last import, it just created 2 
   > posts and skipped the rest and the process ended.
 * We’d really need to check the import settings, data and logs to understand why
   only 2 were imported. Please replicate the import on a sandbox site at [http://www.wpallimport.com/debug/](http://www.wpallimport.com/debug/)
   and then open a support request at [http://www.wpallimport.com/support/](http://www.wpallimport.com/support/)
   with details on the issue and a link to the sandbox site.
 * > At the end of this process it consumed all the resources of the server and 
   > gave “database connection error” and shut down my website.
 * It is possible that this happened due to recounting terms at the end of the import.
   Try adding this code snippet to your child theme’s functions.php file and see
   if it fixes it:
 *     ```
       add_filter('wp_all_import_recount_terms_after_import', 'wpai_wp_all_import_recount_terms_after_import', 10, 2);
       function wpai_wp_all_import_recount_terms_after_import($is_recount_terms, $import_id){
           return false;
       }
       ```
   
 * If that doesn’t fix it, you will need to contact your web host’s support team
   and ask them to check the logs on the server to see why the database crashed.
 * Let us know what they find.
 *  Plugin Author [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * (@wpallimport)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/skipping-posts-while-import-and-cause-server-error/#post-14404397)
 * Hi [@dchero](https://wordpress.org/support/users/dchero/),
 * I am marking this thread as resolved since it’s been inactive for a while. Please
   open a new topic if you still have questions.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Skipping posts while import and cause server error’ is closed to new 
replies.

 * ![](https://ps.w.org/wp-all-import/assets/icon-256x256.png?rev=2570179)
 * [WP All Import – Drag & Drop Import for CSV, XML, Excel & Google Sheets](https://wordpress.org/plugins/wp-all-import/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-all-import/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-all-import/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-all-import/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-all-import/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-all-import/reviews/)

## Tags

 * [database connection error](https://wordpress.org/support/topic-tag/database-connection-error/)
 * [import error](https://wordpress.org/support/topic-tag/import-error/)

 * 2 replies
 * 2 participants
 * Last reply from: [WP All Import](https://wordpress.org/support/users/wpallimport/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/skipping-posts-while-import-and-cause-server-error/#post-14404397)
 * Status: resolved