Skip to content

Instantly share code, notes, and snippets.

@tahmidbintaslim
Forked from trey8611/import-optimizations.md
Created December 26, 2022 07:25
Show Gist options
  • Save tahmidbintaslim/033b1572231a6a9ac88b0ea55e838117 to your computer and use it in GitHub Desktop.
Save tahmidbintaslim/033b1572231a6a9ac88b0ea55e838117 to your computer and use it in GitHub Desktop.

Revisions

  1. @trey8611 trey8611 revised this gist Dec 7, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -103,6 +103,7 @@ To remedy some of these issues, you can:
    - Increase 'In each iteration, process X records' to at least 20 records. __Important__: this only applies to resource usage. If you're running into timeouts instead, it's bad to increase this setting.
    - Disable 'Split file up into X record chunks' option (see: https://d.pr/i/RpqLTm).
    - Remove the images/taxonomies/etc in the main import, then set up a separate import that only imports those items: http://www.wpallimport.com/documentation/recurring/manual-record-matching/.
    - Add a sleep with the "Cron Sleep" setting via All Import › Settings, or add a sleep with the PHP sleep() function and our pmxi_saved_post hook: https://d.pr/n/ryHX31. __This will slow down the import significantly but help with reduced performance during imports__. It should only be necessary if your server has low resources.

    ### Increase speed after optimizations

  2. @trey8611 trey8611 revised this gist Jun 7, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -141,7 +141,7 @@ The web host and server you choose will have a direct impact on the speed of you

    Some WP All Import users have reported huge speed increases by using the Scalability Pro plugin from WP Intense: https://www.wpintense.com/product/scalability-pro/. You can find some articles on their website outlining how they've sped up imports in certain environments in the past.

    _**NOTE**_: _Soflyy/WP All Import is not affiliated with WP Intense in any way and this is not an official recommendation to use them, it's simply added for information and for you to use at your own risk_.
    _**NOTE**_: _Soflyy/WP All Import is not affiliated with WP Intense in any way, and this is not an official recommendation to use them, it's simply added for information and for you to use at your own risk_.

    ---

  3. @trey8611 trey8611 revised this gist Jun 7, 2022. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -135,6 +135,16 @@ The web host and server you choose will have a direct impact on the speed of you
    - LiquidWeb
    - Nexcess
    ---
    ## Third Party Solutions

    ### WP Intense

    Some WP All Import users have reported huge speed increases by using the Scalability Pro plugin from WP Intense: https://www.wpintense.com/product/scalability-pro/. You can find some articles on their website outlining how they've sped up imports in certain environments in the past.

    _**NOTE**_: _Soflyy/WP All Import is not affiliated with WP Intense in any way and this is not an official recommendation to use them, it's simply added for information and for you to use at your own risk_.

    ---

    ## Advanced

    ### Skip updating the posts
  4. @trey8611 trey8611 revised this gist Mar 27, 2022. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,12 @@ Important notes:
    ### Run the import via WP-CLI
    As long as you're not importing a huge amount of data, you can use WP-CLI to import your data much faster: https://www.wpallimport.com/documentation/developers/wp-cli/. Please keep in mind that larger imports may not work via WP-CLI due to server timeout limits. And, you'll need to make sure your WP All Import Add-Ons are compatible with WP-CLI.

    You can disable the import history log to make WP-CLI imports even faster:

    ```
    wp all-import run 1 --disable-log
    ```

    ### Settings that decrease speed

    It's possible that you can't change these settings, but if you're able to it will help with speed:
  5. @trey8611 trey8611 revised this gist Mar 18, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ It's possible that you can't change these settings, but if you're able to it wil
    - Make sure "Cron Sleep" is empty at All Import › Settings.
    - Set "Cron Processing Time Limit" to 120. If the server times out the processing script, lower this until you find the optimal setting (highest number without hitting your server's timeout limits).
    - If the above settings don't help, try a full conflict test: https://gist.github.com/trey8611/72fec5969651d5272fcb85f99b09b8bb#full-conflict-test.
    -

    ### Speeding up "Existing Items" Imports

    When using Manual Record Matching ([see documentation](http://www.wpallimport.com/documentation/recurring/manual-record-matching/)) the fastest and most versatile option is "Post ID". If you don't have the Post ID in your file, you can use a custom PHP function to find the ID: [see documentation](https://www.wpallimport.com/documentation/developers/custom-code/inline-php/).
  6. @trey8611 trey8611 revised this gist Mar 18, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -34,7 +34,7 @@ It's possible that you can't change these settings, but if you're able to it wil
    - Make sure the "processing" cron job is running every 2 minutes (or 1 minute).
    - Make sure "Cron Sleep" is empty at All Import › Settings.
    - Set "Cron Processing Time Limit" to 120. If the server times out the processing script, lower this until you find the optimal setting (highest number without hitting your server's timeout limits).
    - If the above settings don't help, try a full conflict test: http://www.wpallimport.com/documentation/troubleshooting/plugin-theme-conflicts/.
    - If the above settings don't help, try a full conflict test: https://gist.github.com/trey8611/72fec5969651d5272fcb85f99b09b8bb#full-conflict-test.
    -
    ### Speeding up "Existing Items" Imports

  7. @trey8611 trey8611 revised this gist Mar 18, 2022. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -27,8 +27,15 @@ It's possible that you can't change these settings, but if you're able to it wil
    - *Search through the Media Library for existing images before importing new images* & *Keep images currently in Media Library* -> Enable these to increase speed in subsequent runs of the import (*All Import -> Edit Import -> Images*).
    - *Don't check for duplicate SKUs* -> Enable this to increase speed (*All Import -> Edit Import -> WooCommerce Add-On -> Add-On Options*).
    - *Use StreamReader instead of XMLReader to parse import file* -> Disable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to __test your feed/file in a new import__ to confirm that it still works right with this disabled.

    ---

    ### Slow cron imports

    - Make sure the "processing" cron job is running every 2 minutes (or 1 minute).
    - Make sure "Cron Sleep" is empty at All Import › Settings.
    - Set "Cron Processing Time Limit" to 120. If the server times out the processing script, lower this until you find the optimal setting (highest number without hitting your server's timeout limits).
    - If the above settings don't help, try a full conflict test: http://www.wpallimport.com/documentation/troubleshooting/plugin-theme-conflicts/.
    -
    ### Speeding up "Existing Items" Imports

    When using Manual Record Matching ([see documentation](http://www.wpallimport.com/documentation/recurring/manual-record-matching/)) the fastest and most versatile option is "Post ID". If you don't have the Post ID in your file, you can use a custom PHP function to find the ID: [see documentation](https://www.wpallimport.com/documentation/developers/custom-code/inline-php/).
  8. @trey8611 trey8611 revised this gist Mar 18, 2022. 1 changed file with 50 additions and 0 deletions.
    50 changes: 50 additions & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -124,6 +124,56 @@ The web host and server you choose will have a direct impact on the speed of you
    ---
    ## Advanced

    ### Skip updating the posts

    Sometimes the act of updating an entire product can fire off a lot of other code that slows down the import. Consider a scenario where you only want to update the stock level for your products - with this workaround, you'll update the stock field specifically, then skip the act of updating the product via WP All Import.

    You must read the comments in the code and make the necessary changes for it to work with the data on your site. Keep in mind that the import summary is going to say that every single product was skipped - this is expected, and you need to download the history log to view the custom log entries and see what was updated.

    ```php
    function my_is_post_to_update( $continue_import, $post_id, $xml_node, $import_id ) {
    /*********
    * Change this to your import ID.
    * You can find the import ID on the "Manage Imports" page.
    * *******/
    if ( $import_id == 1 ) {

    /*****
    * You need to change 'column_2' to the correct stock element name in your import.
    * column_2 in this case means that the import element is {column_2[1]}.
    * If your stock import element is {stock[1]}, change this to:
    * $xml_node['stock'];
    * *****/

    $new_stock = $xml_node['column_2'];

    /*****
    * Programmatically update the stock value only.
    * ***/
    $prod = wc_get_product( $post_id );
    $prod->set_stock_quantity( $new_stock );
    $prod->save();

    /********
    * Make a log entry since it's going to look like all products are skipped.
    * *****/
    $logger = function($m) {printf("<div class='progress-msg'>[%s] $m</div>\n", date("H:i:s"));flush();};
    call_user_func($logger, "<b>Workaround:</b> Stock for ".$prod->get_name()." set to: ".$xml_node['column_2']);

    /*****
    * Return "false" so that other actions are not fired and the entire
    * product is not updated.
    * ***/
    return false;
    }
    return $continue_import;
    }

    add_filter( 'wp_all_import_is_post_to_update', 'my_is_post_to_update', 10, 4 );
    ```

    ### Skip duplicate checks

    __WARNING__: __Follow these instructions closely or you will end up with many duplicate posts__.

    On the __*very first run of your import*__, if you're __*sure that there are no duplicate posts in your import file*__, you can use this method to import your posts very quickly:
  9. @trey8611 trey8611 revised this gist Feb 23, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -87,7 +87,7 @@ These are the things that *__increase__* CPU/Memory usage:

    To remedy some of these issues, you can:
    - Enable 'Increase speed by disabling do_action calls in wp_insert_post during import.' option in the Import Settings (see: https://d.pr/i/c8LRQ).
    - Increase 'In each iteration, process X records' to at least 20 records.
    - Increase 'In each iteration, process X records' to at least 20 records. __Important__: this only applies to resource usage. If you're running into timeouts instead, it's bad to increase this setting.
    - Disable 'Split file up into X record chunks' option (see: https://d.pr/i/RpqLTm).
    - Remove the images/taxonomies/etc in the main import, then set up a separate import that only imports those items: http://www.wpallimport.com/documentation/recurring/manual-record-matching/.

  10. @trey8611 trey8611 revised this gist Feb 9, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -65,7 +65,7 @@ Depending on your active plugins and theme, it could take a long time to generat

    ### Full Conflict Test

    If other plugins (or your theme) are running a lot of do_action calls during the import, it could cause things to crawl. Check this by running a full conflict test: http://www.wpallimport.com/documentation/troubleshooting/plugin-theme-conflicts/.
    If other plugins (or your theme) are running a lot of do_action calls during the import, it could cause things to crawl. We see this affect cron job imports a lot. Check it by running a full conflict test: http://www.wpallimport.com/documentation/troubleshooting/plugin-theme-conflicts/. If possible, it's best to do this on a staging copy of your site: https://themeisle.com/blog/wordpress-staging-site/.

    ### MyISAM Storage Engine

  11. @trey8611 trey8611 revised this gist Dec 3, 2021. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,10 @@ Follow all of the steps listed here: http://www.wpallimport.com/documentation/tr

    You can enable *Skip posts if their data in your file has not changed* in the import settings of your existing imports: https://d.pr/i/x4tndp. When enabled, posts will be skipped if their data hasn't changed since the last time you ran the import. If the data hasn't changed, imports that used to take hours will complete in minutes.

    Note: This setting is enabled by default in new imports created with WP All Import v4.6.2 and above.
    Important notes:

    - This setting is enabled by default in new imports created with WP All Import v4.6.2 and above.
    - The "Keep images currently in Media Library" option must be enabled in order for this option to work.

    ### Run the import via WP-CLI
    As long as you're not importing a huge amount of data, you can use WP-CLI to import your data much faster: https://www.wpallimport.com/documentation/developers/wp-cli/. Please keep in mind that larger imports may not work via WP-CLI due to server timeout limits. And, you'll need to make sure your WP All Import Add-Ons are compatible with WP-CLI.
  12. @trey8611 trey8611 revised this gist Oct 24, 2021. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -103,6 +103,7 @@ Some common problem areas are:
    - (Server) CPU Usage
    - (Server) Memory Usage
    - (PHP) max_execution_time
    - (PHP) max_input_vars
    - (PHP/Apache) FcgidIOTimeout
    - (PHP/Apache) FcgidBusyTimeout
    - (PHP) mysql.connect_timeout
  13. @trey8611 trey8611 revised this gist Oct 9, 2021. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -56,6 +56,10 @@ Before you clean up your database, __it's extremely important to make a back up

    If you're using a plugin like EWWW Image Optimizer, or Smush Pro, you should disable them before you start your import. These types of plugins can cause the imports to run *extremely* slowly.

    ### Disable image sizes

    Depending on your active plugins and theme, it could take a long time to generate all of the supported image sizes. You can use a plugin like this to disable everything except for the necessary size: https://wordpress.org/plugins/image-sizes/. If that helps, you can generate the necessary sizes *after* the import using the same plugin, or this plugin: https://wordpress.org/plugins/regenerate-thumbnails/.

    ### Full Conflict Test

    If other plugins (or your theme) are running a lot of do_action calls during the import, it could cause things to crawl. Check this by running a full conflict test: http://www.wpallimport.com/documentation/troubleshooting/plugin-theme-conflicts/.
  14. @trey8611 trey8611 revised this gist Oct 4, 2021. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -60,6 +60,10 @@ If you're using a plugin like EWWW Image Optimizer, or Smush Pro, you should dis

    If other plugins (or your theme) are running a lot of do_action calls during the import, it could cause things to crawl. Check this by running a full conflict test: http://www.wpallimport.com/documentation/troubleshooting/plugin-theme-conflicts/.

    ### MyISAM Storage Engine

    If your database tables are using MyISAM, you should switch to InnoDB: https://kinsta.com/knowledgebase/convert-myisam-to-innodb/.

    ### Slow Queries

    Here's a detailed guide on troubleshooting a slow WordPress install in general: https://carlalexander.ca/troubleshoot-wordpress-performance/.
  15. @trey8611 trey8611 revised this gist May 9, 2021. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -95,7 +95,8 @@ Some common problem areas are:
    - (Server) CPU Usage
    - (Server) Memory Usage
    - (PHP) max_execution_time
    - (PHP) FcgidIOTimeout
    - (PHP/Apache) FcgidIOTimeout
    - (PHP/Apache) FcgidBusyTimeout
    - (PHP) mysql.connect_timeout
    - (PHP) default_socket_timeout
    - (MySQL) wait_timeout
    @@ -106,8 +107,8 @@ Some common problem areas are:
    The web host and server you choose will have a direct impact on the speed of your imports. If you're trying to import a lot of data on a bad server, it's going to be slow no matter what you do. If you follow all of the steps above and nothing increases the speed, try switching to a good web host like one of the following:

    - Kinsta
    - SiteGround
    - LiquidWeb
    - Nexcess
    ---
    ## Advanced

  16. @trey8611 trey8611 revised this gist Feb 15, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -84,6 +84,8 @@ To remedy some of these issues, you can:

    Once you've done everything listed above, you can try increasing the records per iteration via the Import Settings to speed things up: https://d.pr/i/Vakkd3. The higher you can set this, the faster the import will run.

    ### Troubleshooting terminations / failures

    If you set the records per iteration higher and the server terminates the import, you can work with your web host to find the error in the logs on your server to see what's causing the termination and fix it: https://gist.github.com/mbissett/d98d1acdf4b2ba11bc67d6f652d4497c.

    If they can't find anything in the logs, try using the error-revealer plugin to log the error yourself: https://github.com/mbissett/error-revealer. Make sure to follow the directions closely and revert the changes to your wp-config.php file when you're done.
  17. @trey8611 trey8611 revised this gist Jan 31, 2021. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,9 @@ You can enable *Skip posts if their data in your file has not changed* in the im

    Note: This setting is enabled by default in new imports created with WP All Import v4.6.2 and above.

    ### Run the import via WP-CLI
    As long as you're not importing a huge amount of data, you can use WP-CLI to import your data much faster: https://www.wpallimport.com/documentation/developers/wp-cli/. Please keep in mind that larger imports may not work via WP-CLI due to server timeout limits. And, you'll need to make sure your WP All Import Add-Ons are compatible with WP-CLI.

    ### Settings that decrease speed

    It's possible that you can't change these settings, but if you're able to it will help with speed:
  18. @trey8611 trey8611 revised this gist Nov 8, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -29,6 +29,8 @@ When using Manual Record Matching ([see documentation](http://www.wpallimport.co

    As an example, if you're updating WooCommerce products and you're using these settings: https://d.pr/i/XzCxWm, you can switch to Post ID and use this function to greatly increase the speed of the import:

    *(__NOTE:__ The latest version of WP All Import Pro and the WooCommerce Add-On do this automatically, but I'm keeping this here as an example)*

    ```php
    [wc_get_product_id_by_sku({sku[1]})]
    ```
  19. @trey8611 trey8611 revised this gist Jul 17, 2020. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,12 @@ If you have a slow import, or if you're running into a lot of server timeouts, t

    Follow all of the steps listed here: http://www.wpallimport.com/documentation/troubleshooting/slow-imports/.

    ### Skip posts if their data has not changed

    You can enable *Skip posts if their data in your file has not changed* in the import settings of your existing imports: https://d.pr/i/x4tndp. When enabled, posts will be skipped if their data hasn't changed since the last time you ran the import. If the data hasn't changed, imports that used to take hours will complete in minutes.

    Note: This setting is enabled by default in new imports created with WP All Import v4.6.2 and above.

    ### Settings that decrease speed

    It's possible that you can't change these settings, but if you're able to it will help with speed:
  20. @trey8611 trey8611 revised this gist Apr 30, 2020. No changes.
  21. @trey8611 trey8611 revised this gist Mar 23, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,7 @@ It's possible that you can't change these settings, but if you're able to it wil
    ---
    ### Speeding up "Existing Items" Imports

    When using Manual Record Matching ([see documentation](http://www.wpallimport.com/documentation/recurring/manual-record-matching/)) the fastest and most versatile option is "Post ID". If you don't have the Post ID in your file, you can use a custom PHP function to find the ID: [see documentation](http://www.wpallimport.com/documentation/developers/execute-php/).
    When using Manual Record Matching ([see documentation](http://www.wpallimport.com/documentation/recurring/manual-record-matching/)) the fastest and most versatile option is "Post ID". If you don't have the Post ID in your file, you can use a custom PHP function to find the ID: [see documentation](https://www.wpallimport.com/documentation/developers/custom-code/inline-php/).

    As an example, if you're updating WooCommerce products and you're using these settings: https://d.pr/i/XzCxWm, you can switch to Post ID and use this function to greatly increase the speed of the import:

  22. @trey8611 trey8611 revised this gist Mar 20, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -30,9 +30,9 @@ As an example, if you're updating WooCommerce products and you're using these se
    See: https://d.pr/i/tDncIB.

    ### Actions from other plugins
    In an attempt to stop other plugins from running a bunch of actions during post save/updates, try enabling *Increase speed by disabling do_action calls in wp_insert_post during import* (*All Import -> Import Settings -> Configure Advanced Settings*): https://d.pr/c8LRQ. _Make sure to check your imported posts and confirm that they're correct with this setting enabled_.
    In an attempt to stop other plugins from running a bunch of actions during post save/updates, try enabling *Increase speed by disabling do_action calls in wp_insert_post during import* (*All Import -> Manage Imports -> Import Settings -> Configure Advanced Settings*): https://d.pr/c8LRQ. _Make sure to check your imported posts and confirm that they're correct with this setting enabled_.

    In some cases, this change can drastically improve the import speed.
    In some cases, this change can significantly improve the import speed.

    ### Database Clean Up

  23. @trey8611 trey8611 revised this gist Mar 20, 2020. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,6 @@ It's possible that you can't change these settings, but if you're able to it wil
    - *Search through the Media Library for existing images before importing new images* & *Keep images currently in Media Library* -> Enable these to increase speed in subsequent runs of the import (*All Import -> Edit Import -> Images*).
    - *Don't check for duplicate SKUs* -> Enable this to increase speed (*All Import -> Edit Import -> WooCommerce Add-On -> Add-On Options*).
    - *Use StreamReader instead of XMLReader to parse import file* -> Disable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to __test your feed/file in a new import__ to confirm that it still works right with this disabled.
    - *Increase speed by disabling do_action calls in wp_insert_post during import* -> Enable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to check your imported posts and confirm that they're correct with this setting enabled.

    ---
    ### Speeding up "Existing Items" Imports
    @@ -30,6 +29,11 @@ As an example, if you're updating WooCommerce products and you're using these se

    See: https://d.pr/i/tDncIB.

    ### Actions from other plugins
    In an attempt to stop other plugins from running a bunch of actions during post save/updates, try enabling *Increase speed by disabling do_action calls in wp_insert_post during import* (*All Import -> Import Settings -> Configure Advanced Settings*): https://d.pr/c8LRQ. _Make sure to check your imported posts and confirm that they're correct with this setting enabled_.

    In some cases, this change can drastically improve the import speed.

    ### Database Clean Up

    Before you clean up your database, __it's extremely important to make a back up that you can roll back to__. After you've made a back up, you can use one of the following plugins to clear transients and orphaned data:
  24. @trey8611 trey8611 revised this gist Feb 28, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -71,6 +71,8 @@ Once you've done everything listed above, you can try increasing the records per

    If you set the records per iteration higher and the server terminates the import, you can work with your web host to find the error in the logs on your server to see what's causing the termination and fix it: https://gist.github.com/mbissett/d98d1acdf4b2ba11bc67d6f652d4497c.

    If they can't find anything in the logs, try using the error-revealer plugin to log the error yourself: https://github.com/mbissett/error-revealer. Make sure to follow the directions closely and revert the changes to your wp-config.php file when you're done.

    Some common problem areas are:

    - (Server) CPU Usage
  25. @trey8611 trey8611 revised this gist Nov 17, 2019. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -86,6 +86,7 @@ Some common problem areas are:
    ## Web Host
    The web host and server you choose will have a direct impact on the speed of your imports. If you're trying to import a lot of data on a bad server, it's going to be slow no matter what you do. If you follow all of the steps above and nothing increases the speed, try switching to a good web host like one of the following:

    - Kinsta
    - SiteGround
    - LiquidWeb
    ---
  26. @trey8611 trey8611 revised this gist Nov 6, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ Follow all of the steps listed here: http://www.wpallimport.com/documentation/tr

    ### Settings that decrease speed

    There are some settings in WP All Import that you might need but will cause slowness. Depending on what you're importing it may be impossible to change these, but if you're able to then it will help.
    It's possible that you can't change these settings, but if you're able to it will help with speed:

    ---
    - *Scan through post content and import images wrapped in \<img\> tags* -> Disable this to increase speed (*All Import -> Edit Import -> Images*).
  27. @trey8611 trey8611 revised this gist Nov 6, 2019. 1 changed file with 5 additions and 9 deletions.
    14 changes: 5 additions & 9 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -11,15 +11,11 @@ Follow all of the steps listed here: http://www.wpallimport.com/documentation/tr
    There are some settings in WP All Import that you might need but will cause slowness. Depending on what you're importing it may be impossible to change these, but if you're able to then it will help.

    ---
    __*Scan through post content and import images wrapped in \<img\> tags*__ -> Disable this to increase speed (*All Import -> Edit Import -> Images*).

    __*Search through the Media Library for existing images before importing new images*__ & __*Keep images currently in Media Library*__ -> Enable these to increase speed in subsequent runs of the import (*All Import -> Edit Import -> Images*).

    __*Don't check for duplicate SKUs*__ -> Enable this to increase speed (*All Import -> Edit Import -> WooCommerce Add-On -> Add-On Options*).

    __*Use StreamReader instead of XMLReader to parse import file*__ -> Disable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to __test your feed/file in a new import__ to confirm that it still works right with this disabled.

    __*Increase speed by disabling do_action calls in wp_insert_post during import*__ -> Enable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to check your imported posts and confirm that they're correct with this setting enabled.
    - *Scan through post content and import images wrapped in \<img\> tags* -> Disable this to increase speed (*All Import -> Edit Import -> Images*).
    - *Search through the Media Library for existing images before importing new images* & *Keep images currently in Media Library* -> Enable these to increase speed in subsequent runs of the import (*All Import -> Edit Import -> Images*).
    - *Don't check for duplicate SKUs* -> Enable this to increase speed (*All Import -> Edit Import -> WooCommerce Add-On -> Add-On Options*).
    - *Use StreamReader instead of XMLReader to parse import file* -> Disable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to __test your feed/file in a new import__ to confirm that it still works right with this disabled.
    - *Increase speed by disabling do_action calls in wp_insert_post during import* -> Enable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to check your imported posts and confirm that they're correct with this setting enabled.

    ---
    ### Speeding up "Existing Items" Imports
  28. @trey8611 trey8611 revised this gist Nov 6, 2019. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,6 @@ __*Scan through post content and import images wrapped in \<img\> tags*__ -> Dis

    __*Search through the Media Library for existing images before importing new images*__ & __*Keep images currently in Media Library*__ -> Enable these to increase speed in subsequent runs of the import (*All Import -> Edit Import -> Images*).

    ---
    __*Don't check for duplicate SKUs*__ -> Enable this to increase speed (*All Import -> Edit Import -> WooCommerce Add-On -> Add-On Options*).

    __*Use StreamReader instead of XMLReader to parse import file*__ -> Disable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to __test your feed/file in a new import__ to confirm that it still works right with this disabled.
  29. @trey8611 trey8611 revised this gist Nov 6, 2019. 1 changed file with 2 additions and 8 deletions.
    10 changes: 2 additions & 8 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -11,15 +11,9 @@ Follow all of the steps listed here: http://www.wpallimport.com/documentation/tr
    There are some settings in WP All Import that you might need but will cause slowness. Depending on what you're importing it may be impossible to change these, but if you're able to then it will help.

    ---
    __*Scan through post content and import images wrapped in \<img\> tags*__
    __*Scan through post content and import images wrapped in \<img\> tags*__ -> Disable this to increase speed (*All Import -> Edit Import -> Images*).

    Disable this to increase speed (*All Import -> Edit Import -> Images*).

    ---
    __*Search through the Media Library for existing images before importing new images*__
    __*Keep images currently in Media Library*__

    Enable these to increase speed in subsequent runs of the import (*All Import -> Edit Import -> Images*).
    __*Search through the Media Library for existing images before importing new images*__ & __*Keep images currently in Media Library*__ -> Enable these to increase speed in subsequent runs of the import (*All Import -> Edit Import -> Images*).

    ---
    __*Don't check for duplicate SKUs*__ -> Enable this to increase speed (*All Import -> Edit Import -> WooCommerce Add-On -> Add-On Options*).
  30. @trey8611 trey8611 revised this gist Nov 6, 2019. 1 changed file with 3 additions and 11 deletions.
    14 changes: 3 additions & 11 deletions import-optimizations.md
    Original file line number Diff line number Diff line change
    @@ -22,19 +22,11 @@ __*Keep images currently in Media Library*__
    Enable these to increase speed in subsequent runs of the import (*All Import -> Edit Import -> Images*).

    ---
    __*Don't check for duplicate SKUs*__
    __*Don't check for duplicate SKUs*__ -> Enable this to increase speed (*All Import -> Edit Import -> WooCommerce Add-On -> Add-On Options*).

    Enable this to increase speed (*All Import -> Edit Import -> WooCommerce Add-On -> Add-On Options*).
    __*Use StreamReader instead of XMLReader to parse import file*__ -> Disable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to __test your feed/file in a new import__ to confirm that it still works right with this disabled.

    ---
    __*Use StreamReader instead of XMLReader to parse import file*__

    Disable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to __test your feed/file in a new import__ to confirm that it still works right with this disabled.

    ---
    __*Increase speed by disabling do_action calls in wp_insert_post during import*__

    Enable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to check your imported posts and confirm that they're correct with this setting enabled.
    __*Increase speed by disabling do_action calls in wp_insert_post during import*__ -> Enable this to increase speed (*All Import -> Import Settings -> Configure Advanced Settings*). Make sure to check your imported posts and confirm that they're correct with this setting enabled.

    ---
    ### Speeding up "Existing Items" Imports