So far I've got around 8,000 products in my WooCommerce and the product page on the front end takes several seconds to load, even after caching.

My VPS host says that I should have multiple databases.
Is that the right method and if so, how is it possible?

Any suggestions on speeding up my database queries or simply speeding up the front end would be great.

  • I found one of the factors slowing down WooCommerce can be the size of the meta table (here my longer blog post with supporting data: danielauener.com/slow-woocommerce-many-products). If you can't avoid that, a more powerfull server or ElasticSearch are my recommendations. Mar 6, 2017 at 17:44

3 Answers 3


This is really a server question and not particularly Wordpress.

You're running into a MySQL server speed bottleneck at 1and1. Sorry, but they're well known as a slow shared host, and for that reason I doubt their VPSs are any better.

Caching and a CDN will only do so much for you. You need more horsepowwer in the form of a better and faster MySQL server, and if you're already paying for a VPS, move to a better VPS host, like Media Temple.

Once there, with root access, you can use a utility such as http://mysqltuner.com to log and analyze the performance of the MySQL server and adjust server memory and database query cache parameters in the configuration file my.cnf. You will also be able to adjust apache - in httpd.conf - to handle high loads.

There is little sense in trying to optimize the database queries made by Woo Commerce or Wordpress; any changes made will need to be made again after updates.

  • I'm trying out WP Super Cache, didn't help to much. I trust you on the server but 1and1 claims its the sites code, could you look at it really quick and confirm? s15430161.onlinehome-server.com/shop/product-category/… just click on one of the various comic thumbnails. Oh and currently there are about 13,000 products in the db.
    – Stephen
    Oct 30, 2012 at 17:39
  • @ the comment above, I cached a few of them, so if it loads instantly try a different one.
    – Stephen
    Oct 30, 2012 at 17:58
  • Forget trying to cache. If you have root at that VPS, check your my.cnf file and run mysqltuner.pl to tune MySQL. Nov 1, 2012 at 4:31
  • 1
    It's not a MySQL bottleneck - it's down to some terrible coding inside Woocommerce and Wordpress which parses through every product in your database using PHP just to count products in each category. The mysql for 100,000 products on a server of mine returns in 0.3 seconds but using basic PHP-FPM the page takes 185 seconds to return (8 core VPS!). When I use HHVM instead, it's 10 seconds. Jan 14, 2015 at 23:23

I have two solutions which I would suggest which should resolve your problem. Turn to the use of elasticsearch.com to populate all product indexes. At the same time you dramatically improve the search capabilities of your website (if integrated correctly). I would make sure to place the elasticsearch solution on a different server.

My thoughts are that your caching system is not setup correctly or your server is overloaded. A solution which might be the cheapest (option #2) would be to use the free caching servers from cloudflare.com. This typically will fix your problem in the most cost effective way if you dont want to deal with server optimizations.


Caching with Varnish is the best solution, however you must avoid caching the header cart snippet and the cart/checkout pages. I think that WooCommerce should be configured with Varnish Edge Side Includes. To exclude checkout Follow these instructions:


Not the answer you're looking for? Browse other questions tagged or ask your own question.