How can I speed up my zen cart website?

03/25/2012 9:45:00 AM

My site bases on zen cart E-commence template, it has 20,000 products now , but it become slower and slower. How can I do?

I have the same problem with you.
I searched the answer from google. Most of them tell me to close the manufacture module of sidebox, and close the counter display of categories and so on. Then I try them all. But my website is still slow. My problem is that the more products are, the slower my website is.
I set the variable: long_query_time = 1 in mysql. Then I found that there are four sql queries which are very slow. Because them select all products every time when you open the website. I located them in four files:
includesmodulessideboxeswhats_new.php
includesmodulesnew_products.php
includesmodulessideboxesspecials.php
includesmodulesspecials_index.php
such as :
$random_whats_new_sidebox_product_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name,
p.master_categories_id
from (" . TABLE_PRODUCTS . " p
left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
where p.products_id = pd.products_id
and pd.language_id = ‘" . (int)$_SESSION['languages_id'] . "’
and p.products_status = 1 " . $display_limit;

the value of variable $display_limit here is NULL, but it should be "limit 0,30", so I set $display_limit= "limit 0,30"; before this line. I speed up my website( http://www.usa-laptop-screen.com) successfully!


Comments

  1. I have the same problem with you.
    I searched the answer from google. Most of them tell me to close the manufacture module of sidebox, and close the counter display of categories and so on. Then I try them all. But my website is still slow. My problem is that the more products are, the slower my website is.
    I set the variable: long_query_time = 1 in mysql. Then I found that there are four sql queries which are very slow. Because them select all products every time when you open the website. I located them in four files:
    includes\modules\sideboxes\whats_new.php
    includes\modules\new_products.php
    includes\modules\sideboxes\specials.php
    includes\modules\specials_index.php
    such as :
    $random_whats_new_sidebox_product_query = "select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name,
    p.master_categories_id
    from (" . TABLE_PRODUCTS . " p
    left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id )
    where p.products_id = pd.products_id
    and pd.language_id = ‘" . (int)$_SESSION['languages_id'] . "’
    and p.products_status = 1 " . $display_limit;

    the value of variable $display_limit here is NULL, but it should be "limit 0,30", so I set $display_limit= "limit 0,30"; before this line. I speed up my website( http://www.usa-laptop-screen.com) successfully!
    References :
    http://www.usa-laptop-screen.com

    luckyjaly - March 25, 2012 3:07 pm

Leave a comment
Name (required)
Mail (will not be published) (required)
Website

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>