Jump to content

Recommended Posts

Hola a todos:

Estoy configurando mi tienda y noto que es algo lenta al cargar, incluso cuando quiero una vista previa del producto y cuando lo agrego al carrito.

¿Cómo podría mejorar la velocidad?, les comparto capturas de como tengo configurado el apartado de rendimiento:

image.thumb.png.4f24cd83b352ecfa4cf8afc94c69967a.png

image.thumb.png.e7d8311a58dbc91083cb9562fa0b4800.png

image.thumb.png.1f7d95ddd44d12fb209db827b25dce11.png

image.thumb.png.122dbb9243cca73a6f23380e0c13287e.png

image.thumb.png.90577c2e6ad1bbfb7b3e23a41aea0d27.png

image.thumb.png.9d69ff0bd28bd8ad0708cbdfccd52bed.png

 

Aparte tengo configurado el .htaccess así, me basé en este artículo https://www.presta-addons-modules.com/en/blog/227_Prestashop-how-to-use--htaccess-to-speed-up-your-site.html

 



# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# https://www.prestashop.com - https://www.prestashop.com/forums

<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>

RewriteEngine on


#Domain: www.ka-boomcomics.com
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L]

# Images
RewriteCond %{HTTP_HOST} ^www.ka-boomcomics.com$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.ka-boomcomics.com$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^www.ka-boomcomics.com$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteCond %{HTTP_HOST} ^www.ka-boomcomics.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteCond %{HTTP_HOST} ^www.ka-boomcomics.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteCond %{HTTP_HOST} ^www.ka-boomcomics.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteCond %{HTTP_HOST} ^www.ka-boomcomics.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteCond %{HTTP_HOST} ^www.ka-boomcomics.com$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.ka-boomcomics.com$
RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/font-woff .woff
AddType font/woff2 .woff2
<IfModule mod_headers.c>
	<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg)$">
		Header set Access-Control-Allow-Origin "*"
	</FilesMatch>

    <FilesMatch "\.pdf$">
      Header set Content-Disposition "Attachment"
      Header set X-Content-Type-Options "nosniff"
    </FilesMatch>

	##### 1 Month for most static resources
	<filesMatch ".(css|jpg|jpeg|png|gif|js|ico)$">
	Header set Cache-Control "max-age=2592000, public"
	</filesMatch>
</IfModule>

<Files composer.lock>
    # Apache 2.2
    <IfModule !mod_authz_core.c>
        Order deny,allow
        Deny from all
    </IfModule>

    # Apache 2.4
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
</Files>

##### Optimize default expiration time - BEGIN
<IfModule mod_expires.c>
	## Enable expiration control
	ExpiresActive On

	## CSS and JS expiration: 1 week after request
	ExpiresByType text/css "now plus 1 week"
    ExpiresByType application/javascript "now plus 1 week"
    ExpiresByType application/x-javascript "now plus 1 week"

	ExpiresByType text/javascript "access plus 1 week"

	## Image files expiration: 1 month after request
	ExpiresByType image/bmp "now plus 1 month"
	ExpiresByType image/gif "now plus 1 month"
    ExpiresByType image/jpeg "now plus 1 month"
	ExpiresByType image/jp2 "now plus 1 month"
    ExpiresByType image/pipeg "now plus 1 month"
    ExpiresByType image/png "now plus 1 month"
	ExpiresByType image/svg+xml "now plus 1 month"
    ExpiresByType image/tiff "now plus 1 month"
    ExpiresByType image/x-icon "now plus 1 month"
    ExpiresByType image/ico "now plus 1 month"
    ExpiresByType image/icon "now plus 1 month"
    ExpiresByType text/ico "now plus 1 month"
    ExpiresByType application/ico "now plus 1 month"
    ExpiresByType image/vnd.wap.wbmp "now plus 1 month"

	ExpiresByType image/vnd.microsoft.icon "now plus 1 month"

	# ExpiresByType image/gif "access plus 1 month"
	# ExpiresByType image/jpeg "access plus 1 month"
	# ExpiresByType image/png "access plus 1 month"
	# ExpiresByType text/css "access plus 1 week"
	# ExpiresByType text/javascript "access plus 1 week"
	# ExpiresByType application/javascript "access plus 1 week"
	# ExpiresByType application/x-javascript "access plus 1 week"
	# ExpiresByType image/x-icon "access plus 1 year"
	# ExpiresByType image/svg+xml "access plus 1 year"
	# ExpiresByType image/vnd.microsoft.icon "access plus 1 year"

	## Font files expiration: 1 week after request
	ExpiresByType application/x-font-ttf "now plus 1 week"
    ExpiresByType application/x-font-opentype "now plus 1 week"
    ExpiresByType application/x-font-woff "now plus 1 week"
    ExpiresByType font/woff2 "now plus 1 week"
    ExpiresByType image/svg+xml "now plus 1 week"

	ExpiresByType application/font-woff "now plus 1 week"
	ExpiresByType application/vnd.ms-fontobject "now plus 1 week"
	ExpiresByType font/opentype "now plus 1 week"
	ExpiresByType font/ttf "now plus 1 week"
	ExpiresByType font/otf "now plus 1 week"
	ExpiresByType application/x-font-otf "now plus 1 week"

	# ExpiresByType application/font-woff "access plus 1 year"
	# ExpiresByType application/x-font-woff "access plus 1 year"
	# ExpiresByType font/woff2 "access plus 1 year"
	# ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
	# ExpiresByType font/opentype "access plus 1 year"
	# ExpiresByType font/ttf "access plus 1 year"
	# ExpiresByType font/otf "access plus 1 year"
	# ExpiresByType application/x-font-ttf "access plus 1 year"
	# ExpiresByType application/x-font-otf "access plus 1 year"

	## Audio files expiration: 1 month after request
	ExpiresByType audio/ogg "now plus 1 month"
	ExpiresByType application/ogg "now plus 1 month"
	ExpiresByType audio/basic "now plus 1 month"
	ExpiresByType audio/mid "now plus 1 month"
	ExpiresByType audio/midi "now plus 1 month"
	ExpiresByType audio/mpeg "now plus 1 month"
	ExpiresByType audio/mp3 "now plus 1 month"
	ExpiresByType audio/x-aiff "now plus 1 month"
	ExpiresByType audio/x-mpegurl "now plus 1 month"
	ExpiresByType audio/x-pn-realaudio "now plus 1 month"
	ExpiresByType audio/x-wav "now plus 1 month"

	## Movie files expiration: 1 month after request
	ExpiresByType application/x-shockwave-flash "now plus 1 month"
	ExpiresByType x-world/x-vrml "now plus 1 month"
	ExpiresByType video/x-msvideo "now plus 1 month"
	ExpiresByType video/mpeg "now plus 1 month"
	ExpiresByType video/mp4 "now plus 1 month"
	ExpiresByType video/quicktime "now plus 1 month"
	ExpiresByType video/x-la-asf "now plus 1 month"
	ExpiresByType video/x-ms-asf "now plus 1 month"
</IfModule>
##### Optimize default expiration time - END

<IfModule mod_headers.c>
    Header unset Etag
</IfModule>
FileETag none
<IfModule mod_deflate.c>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/html text/css text/javascript application/javascript application/x-javascript font/ttf application/x-font-ttf font/otf application/x-font-otf font/opentype image/svg+xml
    </IfModule>
</IfModule>

#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404


# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

Les agradezco mucho el apoyo, si necesitan otro dato para ayudarme con esto, solo díganme 🙂

Link to comment
Share on other sites

a simple vista lo tienes todo correcto en el .htaccess

backoffice->Smarty
Tipo de Cache no uses mysql... ya que lo procesara en la base de datos mejor usa sistema de archivos y verifica que tu servidor NO use disco duro mecanicos y que use ssd o nvme

Vaciar memoria chache. Tambien es en Nunca limpiar cache (tu sitio ya deberia de estar al publico para ya no hacer cambios de nada)

Consideraciones
Usar Servidores VPS no uses servidores compartidos
Si usas estadisticas de prestashop, busquedas por facetas ten en cuenta que el servidor mysql tendra que ser muy potente..
verifica de un buen diseñador el theme

 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
On 1/9/2023 at 6:23 AM, Rebeca Soriano said:

Muchas gracias a ambos, estoy haciendo pruebas con sus sugerencias, mi tienda aún está en construcción y por el momento no cambiaré lo de Vaciar caché cuando algo haya sido modificado.

Aunque está en un servidor compartido, éste usa un disco ssd 🙂

Hola,

No recomiendo nunca usar hosting compartidos para tiendas Prestashop. Es un negocio online y como tal, se debe de invertir un poco en ese tema para poder aumentar la seguridad, el rendimiento web y tener un servidor que se pueda personalizar y adaptar a las necesidades de la tienda.

Yo recomiendo el uso de servidores VPS o dedicados. Para una tienda pequeña o mediana, con un VPS tiene suficiente y siempre que se contrate en proveedores de confianza que ofrezcan servidores de calidad y sin demasiadas limitaciones. 

Para aumentar el rendimiento de la web, es primordial disponer de un buen servidor con recursos de CPU, RAM y que esté bien optimizado para el uso con tiendas online, para evitar que se colapse por los hilos de procesos abiertos mientras se realizan operaciones dentro de la tienda o se usen módulos que necesiten de recursos del servidor.

Si dispones de un servidor mal configurado o limitado, por mucho que configures el .htaccess con uso de caché no obtendrás buenos resultados.

Hace tiempo, que creamos un Artículo en nuestra web sobre un tutorial para optimizar la tienda Prestashop. Te recomiendo que lo leas detenidamente, ya que se explica cada punto con detalle.

https://www.liewebs.com/prestashop/tutorial-aumentar-velocidad-rendimiento-optimizar-tiendas-prestashop/

 Saludos.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...