I have developed my site from localhost, right after I am hosting. Now site is loading very slow as compared to speed in localhost.
What can I do to speedup website?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityI have developed my site from localhost, right after I am hosting. Now site is loading very slow as compared to speed in localhost.
What can I do to speedup website?
You can follow below two links for speed optimization,
https://docs.nexcess.net/article/how-to-optimize-magento-performance.html
https://docs.nexcess.net/article/how-to-perform-magento-database-maintenance.html
Quick way to speed up Magento is to
But if after all the site on Server is slower that on localhost - than it's Server issues and it should be configured better (use SSD storage for database for example)
If your site have a lot of modifications, you can also try next on local copy:
edit file app/code/core/Mage/Core/Block/Template.php
and replace function _toHtml()
with next:
protected function _toHtml()
{
if (!$this->getTemplate()) {
return '';
}
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
$html = $this->renderView();
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
if($total_time > 0.4) {
return $html."<h4><br/><br/>{$this->getTemplate()} | ".$total_time.' seconds passed </h4>';
} else {
return $html;
}
}
then, if any block on page is loaded more that 0.4 seconds - you will see it's load time at the bottom of block (on frontend) BUT ... parent blocks will show summary time of all their child blocks.
So you have to find blocks with big load time and deep nesting. Or it can be blocks that repeats many times on page (but also have deep nesting)