Hello, I would like to know if there's a known way to re-generate the Image Cache folder using the cli without the need to navigate to each page/product one at a time?
Very important to me as I'm recreating a site with more than 15k items and this will crash due to a time out when trying to navigate to any item
I have tried without any images and the site is very fast and responsive but as soon as I link the images this will be very slow.
Version 3.0.3.6
Php 7.3
Mysql 8
Thanks,
Very important to me as I'm recreating a site with more than 15k items and this will crash due to a time out when trying to navigate to any item
I have tried without any images and the site is very fast and responsive but as soon as I link the images this will be very slow.
Version 3.0.3.6
Php 7.3
Mysql 8
Thanks,
Last edited by haxcop on Mon Feb 06, 2023 4:14 am, edited 1 time in total.
I don't believe there's a way to do it built-in to OpenCart but you could use this command to browse every page:
Hit All Pages of a Website (4 levels deep) - useful if you've cleared the cache and it doesn't automatically regenerate:
From here: https://www.antropy.co.uk/blog/handy-linux-commands/
Hit All Pages of a Website (4 levels deep) - useful if you've cleared the cache and it doesn't automatically regenerate:
Code: Select all
wget --spider -r -l4 website-to-spider.com
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
As stated above, normally you would run a local spider on your site to generate the images when the cache has been deleted but in your case that spider may well crash as well.
When your page slows / crashes (probably time out or memory) because it needs to generate the images on it, your images are probably too big or you have too many images on your page or both.
You can increase the script runtime limit but that will only take you so far.
If you want to generate one image at a time via CLI, you would have to create a script for that and an image inventory (file, dimensions, etc) and there is none.
So first find out if the crash is a time out, a memory limit or a corrupt image. Then check the original images dimensions and the amount of images you put on any given page.
When your page slows / crashes (probably time out or memory) because it needs to generate the images on it, your images are probably too big or you have too many images on your page or both.
You can increase the script runtime limit but that will only take you so far.
If you want to generate one image at a time via CLI, you would have to create a script for that and an image inventory (file, dimensions, etc) and there is none.
So first find out if the crash is a time out, a memory limit or a corrupt image. Then check the original images dimensions and the amount of images you put on any given page.
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
I think you should fix the core problem first: error while generating image. Check your error log/ server log for error message.haxcop wrote: ↑Wed May 25, 2022 3:41 amHello, I would like to know if there's a known way to re-generate the Image Cache folder using the cli without the need to navigate to each page/product one at a time?
Very important to me as I'm recreating a site with more than 15k items and this will crash due to a time out when trying to navigate to any item
I have tried without any images and the site is very fast and responsive but as soon as I link the images this will be very slow.
Version 3.0.3.6
Php 7.3
Mysql 8
Thanks,
OPENCART MODULE :
Opencart Compare Link Link your compared product to forum/email
Frontend Link From Admin Dashboard Get link to product , category, manufacturer, information from admin backend.
Copy and DIRECTLY Edit Product the easy way.
Custom Product Sort Full control to product sorting options
Already Sold Product Module, shows total product sold
Who is online
Users browsing this forum: paulfeakins and 411 guests