Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by Daresh

  1. To delete images you can use the following code, just place the script in the root folder of the shop:

    $limit = 1;
    if (Tools::isSubmit('limit')) {
    	$limit = (int) $limit;
    $sql = 'SELECT `id_image` FROM `'._DB_PREFIX_.'image` LIMIT '.$limit;
    $res = Db::getInstance()->executeS($sql);
    if ($res) {
    	foreach ($res as $row) {
    		$imageId = $row['id_image'];
    		echo $imageId.'<br/>';
    		$image = new Image($imageId);

    And then visit the script in your browser. You can also add additional parameter to indicate how many images to delete at once, the default is 1. You do it this way: del-img.php?limit=100


    • Like 1
  2. Long backup process is often caused by the following factors:

    - large number of images, but images rather don't need to be backed up, risk of loosing the images is quite low, so this option ca be safely turned off in the upgrade module

    - some additional non-prestashop subfolder inside shop's main folder, sometimes some other software is installed in a subfolder, it's better to put it in a subdomain

    - large database, it can be bloated by statistics, if the shop has many visitors, there can be millions of rows, that are not much needed any more

    I recommend using the Tidy module before the upgrade to clean up the database, I had cases where the backup took a minute, when it was more than half an hour before the cleanup.

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More