Having trouble with WooCommerce’s built-in Variable Products? No problem! Read the quick troubleshooting guide below to see some of the more common issues that plague user sites – of course, be sure to check for code conflicts first.
With so many variables coming into play (even if they aren’t used), you can very quickly overload your server by using Product Variations. This can be particularly frustrating – after adding a bunch of variations, your information isn’t even saving! All of your work gone. What a piece of crap, right?
Unfortunately, the fingers shouldn’t be pointing at WooCommerce, but your server setup – here are some common procedures to help out.
After hanging for a long time, the product reloads and Variations are lost.
This sounds like a symptom of your PHP Memory Limit as established by your server and your WordPress installation. By default, WordPress allows for a measly 40MB of memory to handle processes – underpowered for today’s needs. Luckily, this is usually a simple fix – by using an FTP editor, you just have to open your site’s
wp-config.php file. Scroll all the way down to the line where you see the following text:
/* That’s all, stop editing! Happy blogging. */
In the line just above that, edit the file so it appears like so:
define( 'WP_MEMORY_LIMIT', '126M' ); /* That’s all, stop editing! Happy blogging. */
Now, you’ve told WordPress to use up to 126 MB – much better! Keep in mind that some shared hosts may put a limit on this, so if you don’t see any actual improvement after making this change, you may need to contact your host to have them do it for you.
Product Variations Do Not Save
In some cases, your variable product loads up just fine, but half of your variations didn’t save – gone without a trace. This is a sure sign of something called PHP Max Input Vars, which is just as it sounds – the maximum number of variables that PHP will allow in a single action. With variable products that have dozens of values per variation, you can very easily surpass the 1000 variable default, so we need to raise that limit. This is a bit of a bigger fix, but luckily it’s painless once you identify the cause.
To fix this issue, you’ll need to get FTP access to your server’s
php.ini file, usually located at the server’s root folder along with the
public_html folder. If any of that is intimidating to you, then it’s best to contact your web host and have them handle this from here on out, but for the bolder ones, follow these steps:
php.iniin your text editor of choice.
- Do a text search, usually with
Control + Ffor Windows or
Command + Ffor Mac users.
max_input_vars. On that line, you should see by default:
max_input_vars = 1000.
- Change this to
max_input_vars = 5000
Restart your server, and you should be good to go! Again, remember that your web host may have a restriction on your account, so if this doesn’t show improvement, it’s always best to reach out to them.
Have any questions or comments about this article, or ways you think it can be improved?
Join the conversation in the comments below, or sign up for my newsletter to recieve periodic updates!