Siteground has WP-CLI installed and when you have WooCommerce installed it adds its own set of WP-CLI commands.
See this:
https://github.com/woocommerce/woocommerce/wiki/WC-CLI-Overview
With this your solution would be cleaner as it would go though WC’s API.
Maybe you can also check for ideas how WC does it. I remember in the add/edit product UI there was a link to (re)generate variations but there was limit I think.
Related Posts:
- Steps to optimize WordPress in regard to server load and website speed?
- Website is slow: advice on optimization
- Can we have a post without a slug?
- How to properly insert a stylesheet in wp_head
- Using Multiple Queries of “home_url” vs. Calling a Variable Multiple Times
- Could a higher number of registered image sizes affect performance?
- Page taking time in loading. Also used lazy loading but doesn’t work?
- Optimizing site speed by localizing paths
- get_the_id, get_the_permalink, and get_the_title all with one DB call
- High traffic management in WP
- wp_set_post_terms() seems very slow
- admin.php taking 14 seconds
- How to optimize recaptcha__en.js
- How can I optimize my website for improved speed? [closed]
- What’s the best way to search for a UPC code in a Database?
- what does O(N) mean [duplicate]
- Which Python memory profiler is recommended? [closed]
- What is the difference between spark.sql.shuffle.partitions and spark.default.parallelism?
- Big O, how do you calculate/approximate it?
- What is the difference between set and hashset in C++ STL?
- Java check if boolean is null
- the asymptotic growth of n choose floor(n/2)
- Slow Query for the wp_options table
- What is the best caching option for WordPress multi-site on non-shared hosting?
- Why is home (a lot) slower than other pages?
- How many posts can I have in a WordPress website?
- WordPress so slow to load on MAMP
- Do multiple revisions really slow down WordPress?
- Fastest server stack configuration for WordPress?
- Cache WordPress translations
- What is the proper use of https in a modern E-Commerce environment?
- What are best practices for configuring a server for WordPress sites?
- Utilize WordPress Authentication Only
- WordPress tries to load “next page” after done loading current page
- Is checking whether the blog is installed necessary?
- What is a reasonable get_num_queries() result?
- Performance impact of using functions in WordPress?
- Hardcoding and WordPress Performance
- What should be disabled to run on an internal network with no access to the Internet?
- Does running WordPress on Nginx do “squat” for its performance?
- The effect of spam comments on hosting resource usage (CPU)
- What other plugins are there available to track app performance for wordpress?
- Combining multiple javascript and css files
- How many caching plugins should be used?
- Why can’t /wp-login.php be load balanced?
- Preload external PHP information
- Removing translation textdomain
- AWS (or others) vs VPS
- Do I manually minify css code in my main theme or child theme?
- Downsize CPU & DB usage in wordpress
- WordPress 3+ slow load times on Ubuntu 10.10
- WP Optimization: Removing Orphaned wp_options (especially the autoload ones)
- Point static content like css and js to cookieless subdomain
- upper limit on concurrent editing?
- Will Gutenberg Have a Negative Impact on Page Speed?
- Preload Cache for thousands of posts may be on non-production environment
- Page Loading Issue [closed]
- fastest replacement DB
- Suggestion to improve slow WordPress page
- Optimise page loading time faster on Genesis child theme [closed]
- Optimizing a WordPress site
- Long wait times in first part of call to WordPress on Azure
- does wordpress serve static files?
- Server Hardware for WordPress [closed]
- Conditionally include files in functions.php?
- WordPress network vs Separate installs
- Bandwidth usage increased in WordPress 3.5
- How to test site speed?
- Remove unused CSS and JS
- Measure WordPress performance on different hosts
- Calling various CSS sheets in header a good idea?
- Optimizing function that automatically creates internal links based on post title string
- Using functions repeatedly instead of variables
- WordPress Site Speed (Maybe Server Issue)
- Does fixing PHP notices improves website performance?
- How do I make content only load on desktop? [duplicate]
- Slow issues with Website running WordPress on Azure
- WordPress digitalocean taking forever to load
- Favicon is loading very late
- Website slow : my fault or the host?
- Website Load Time takes forever
- What can be a solution when my wordpress is extremely slow?
- get_template_part calls amount and performance?
- Improve WordPress performance on large number of posts
- licenses, subscriptions, etc and the impact on performance
- Website is loading twice unnecessarily
- WordPress slow even use blank template
- What’s the best way to dequeue / remove uncooperative scripts and styles?
- Is WP-Cron / wp_schedule_event suitable for time-consuming actions?
- Using static home page and wordpress only as a blog
- Optimising amount of calls to custom fields
- High I/O load when hosting lots of wordpress sites
- How we can reduce wordpress page loading time? [closed]
- How to Aggregate, minify and compress (AMC) static and dynamic resources?
- Site too Slow to establish db connection?
- How to resolve google page speed issues for wordpress website
- To what degree can use of caching-plugins and a CDN boost WordPress performance? [closed]
- TTFB is too slow in back-end [closed]
- What kind of data that 3rd part dependencies using?
- FreeBSD performance tuning: Sysctl parameter, loader.conf, kernel