WooCommerce shop very slow
-
Hello,
the WooCommerce shop I recently set up is very slow. 15-30 seconds loading time for the shop page, the products slowly appear one after the other. I analyzed the page on gtmetrix.com and the waterfall diagram shows that most of the time seems to be consumed creating the html code outputting the products. Can you help me fix this?
Disabling all plugins did not help. Installing a cache plugin (W3 total cache) lead to better results on gtmetrix.com, but in the browser the page was still very slow, rendering a bit different: showing nothing for 15 seconds (not part by part) and then the full page.Edit: possibly relevant content of sale-flash.php (removing it makes the page load 5 seconds faster):
<?php $threshold = 20.1; // Minimum Prozent damit der "Angebot"-Kreis angezeigt wird. In single-product/sale-flash.php UND loop/sale-flash.php ?> <?php if ($product->is_on_sale() && $product->get_type() == 'variable') : ?> <?php $available_variations = $product->get_available_variations(); $maximumpercent = 0; for ($i = 0; $i < count($available_variations); ++$i) { $variation_id = $available_variations[$i]['variation_id']; $variable_product1 = new WC_Product_Variation( $variation_id ); $regular_price = $variable_product1->get_regular_price(); $sales_price = $variable_product1->get_sale_price(); $percentage = round((( ( $regular_price - $sales_price ) / $regular_price ) * 100),2) ; if ($percentage > $maximumpercent) { $maximumpercent = $percentage; } } if ($maximumpercent >= $threshold) { echo apply_filters( 'woocommerce_sale_flash', '<span class="onsale">'. esc_html__( 'Sale!', 'woocommerce' ) . '</span>', $post, $product ); } ?> <?php elseif($product->is_on_sale() && $product->get_type() == 'simple') : ?> <?php $percentage = round((( ( $product->get_regular_price() - $product->get_sale_price() ) / $product->get_regular_price() ) * 100),2 ); if ($percentage >= $threshold) { echo apply_filters( 'woocommerce_sale_flash', '<span class="onsale">'. esc_html__( 'Sale!', 'woocommerce' ) . '</span>', $post, $product ); } ?> <?php endif;
### WordPress Environment ### Home URL: https://www.sporthaus-kassel.de Site URL: https://www.sporthaus-kassel.de WC Version: 3.2.6 Log Directory Writable: ? WP Version: 4.8.4 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ? Language: de_DE ### Server Environment ### Server Info: Apache/2.2.31 (Unix) PHP Version: 7.0.25 PHP Post Max Size: 76 MB PHP Time Limit: 0 PHP Max Input Vars: 4000 cURL Version: 7.50.3 OpenSSL/1.0.2j SUHOSIN Installed: – MySQL Version: 5.6.37 Max Upload Size: 64 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 3.2.6 WC Database Prefix: wpsporthaus_ MaxMind GeoIP Database: ? Die MaxMind GeoIP Datenbank existiert nicht - Die Ortung (Geolokalisierung) wird nicht funktionieren. Du kannst sie manuell installieren von https://dev.maxmind.com/geoip/legacy/geolite/ zu dem Pfad: . Scrolle einfach nach unten bis zu "Downloads" und lade die Datei "Binary / gzip" vom Typ "GeoLite Country" herunter. Denke bitte daran die Datei GeoIP.dat.gz zu entpacken und nur die entpackte Datei GeoIP.dat hochzuladen. Datenbank-Gesamtgr??e: 44.88MB Datenbank-Datengr??e: 28.58MB Datenbank-Indexgr??e: 16.30MB wpsporthaus_woocommerce_sessions: Daten: 0.02MB + Index: 0.02MB wpsporthaus_woocommerce_api_keys: Daten: 0.02MB + Index: 0.03MB wpsporthaus_woocommerce_attribute_taxonomies: Daten: 0.02MB + Index: 0.02MB wpsporthaus_woocommerce_downloadable_product_permissions: Daten: 0.02MB + Index: 0.05MB wpsporthaus_woocommerce_order_items: Daten: 0.02MB + Index: 0.02MB wpsporthaus_woocommerce_order_itemmeta: Daten: 0.02MB + Index: 0.03MB wpsporthaus_woocommerce_tax_rates: Daten: 0.02MB + Index: 0.06MB wpsporthaus_woocommerce_tax_rate_locations: Daten: 0.02MB + Index: 0.03MB wpsporthaus_woocommerce_shipping_zones: Daten: 0.02MB + Index: 0.00MB wpsporthaus_woocommerce_shipping_zone_locations: Daten: 0.02MB + Index: 0.03MB wpsporthaus_woocommerce_shipping_zone_methods: Daten: 0.02MB + Index: 0.00MB wpsporthaus_woocommerce_payment_tokens: Daten: 0.02MB + Index: 0.02MB wpsporthaus_woocommerce_payment_tokenmeta: Daten: 0.02MB + Index: 0.03MB wpsporthaus_woocommerce_log: Daten: 0.02MB + Index: 0.02MB wpsporthaus_commentmeta: Daten: 0.02MB + Index: 0.03MB wpsporthaus_comments: Daten: 0.02MB + Index: 0.09MB wpsporthaus_dynamic_widgets: Daten: 0.05MB + Index: 0.02MB wpsporthaus_iwp_backup_status: Daten: 0.02MB + Index: 0.00MB wpsporthaus_links: Daten: 0.02MB + Index: 0.02MB wpsporthaus_options: Daten: 2.47MB + Index: 0.36MB wpsporthaus_pmxi_files: Daten: 0.02MB + Index: 0.00MB wpsporthaus_pmxi_history: Daten: 0.02MB + Index: 0.00MB wpsporthaus_pmxi_imports: Daten: 0.23MB + Index: 0.00MB wpsporthaus_pmxi_posts: Daten: 1.52MB + Index: 0.00MB wpsporthaus_pmxi_templates: Daten: 0.05MB + Index: 0.00MB wpsporthaus_postmeta: Daten: 19.55MB + Index: 13.59MB wpsporthaus_posts: Daten: 2.52MB + Index: 1.08MB wpsporthaus_termmeta: Daten: 0.09MB + Index: 0.13MB wpsporthaus_terms: Daten: 0.09MB + Index: 0.13MB wpsporthaus_term_relationships: Daten: 1.47MB + Index: 0.30MB wpsporthaus_term_taxonomy: Daten: 0.09MB + Index: 0.11MB wpsporthaus_usermeta: Daten: 0.03MB + Index: 0.03MB wpsporthaus_users: Daten: 0.02MB + Index: 0.05MB ### Post Type Counts ### attachment: 1066 invoice: 8 nav_menu_item: 24 page: 19 popup: 5 popup_theme: 6 post: 2 product: 371 product_variation: 5645 revision: 167 shop_coupon: 1 shop_order: 2 wpcf7_contact_form: 1 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (20) ### InfiniteWP - Client: von Revmakx – 1.6.8.1 BackUpWordPress: von Human Made Limited – 3.6.4 CGC Maintenance Mode: von Pippin Williamson – 1.2 Contact Form 7: von Takayuki Miyoshi – 4.9.2 Dynamic Widgets: von Qurl – 1.5.13 Enhanced Media Library PRO: von wpUXsolutions – 2.4.5 WPBakery Page Builder: von Michael M - WPBakery.com – 5.4.2 Popup Maker: von WP Popup Maker – 1.6.6 Regenerate Thumbnails: von Alex Mills (Viper007Bond) – 3.0.1 Square Thumbnails: von ILMDESIGNS – 1.1.0 User Role Editor: von Vladimir Garagulya – 4.39 Vendidero Helper: von Vendidero – 1.1.4 WC Password Strength Settings: von Daniel Santoro – 2.0.1 Woocommerce Role Pricing PRO: von eggemplo – 3.2.0 – Nicht getestest mit der aktiven WooCommerce-Version WooCommerce Germanized Pro: von Vendidero – 1.8.4 WooCommerce Germanized: von Vendidero – 1.9.6 WooCommerce: von Automattic – 3.2.6 WP All Import Pro: von Soflyy – 4.5.0 WP-Sweep: von Lester 'GaMerZ' Chan – 1.0.12 WP All Import - WooCommerce Add-On Pro: von Soflyy – 2.3.8 ### Settings ### API Enabled: ? Force SSL: – Currency: EUR (€) Currency Position: right_space Thousand Separator: . Decimal Separator: , Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) ### WC Pages ### Shop-Basis: #55 - /shop/ Warenkorb: #56 - /warenkorb/ Kasse: #57 - /kasse/ Mein Konto: #58 - /mein-konto/ Gesch?ftsbedingungen: #65 - /agb/ ### Theme ### Name: Sporthaus Kassel Version: 1.0 Author URL: https://www.lopri.com Child Theme: ? – Wenn du WooCommerce mit einem Theme das du nicht selbst entwickelt hast an eigene Bedürfnisse anpasst dann empfehlen wir die Verwendung eines Child-Themes. Siehe Wie du ein Child-Theme erstellst (engl.) WooCommerce Support: ? ### Templates ### Archive Template: Dein Theme hat eine woocommerce.php-Datei was dazu führt dass du das Template woocommerce/archive-product.php nicht überschreibenk annst da woocommerce.php h?her gewichtet wird als archive-product.php. Das ist beabsichtigt um Darstellungsprobleme zu verhindern. Overrides: sporthaus-wp-theme/woocommerce/cart/mini-cart.php Version 3.1.0 ist veraltet. Die Hauptversion ist 3.2.0 sporthaus-wp-theme/woocommerce/loop/sale-flash.php sporthaus-wp-theme/woocommerce/single-product/sale-flash.php Outdated Templates: ?Erfahren Sie wie Sie aktualisieren k?nnen
- This topic was modified 7 years, 2 months ago by .
- This topic was modified 7 years, 2 months ago by .
- This topic was modified 7 years, 2 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘WooCommerce shop very slow’ is closed to new replies.