Skip to content

Instantly share code, notes, and snippets.

@jasperf
Last active August 16, 2025 00:58
Show Gist options
  • Select an option

  • Save jasperf/3b8a577b517fce52078a0c3a155f49f9 to your computer and use it in GitHub Desktop.

Select an option

Save jasperf/3b8a577b517fce52078a0c3a155f49f9 to your computer and use it in GitHub Desktop.
Prestashop 1.7.6 upgrade
# Where the Backup Setting Actually Lives
# In v6.x, autoupgrade doesn’t read a config.json — instead it stores its settings in:
cd /root/build/modules/autoupgrade/config/
# specifically in a file like:
# config.inc.php
#Inside you’ll see constants such as:
define('PS_AUTOUP_BACKUP', '1');
define('PS_AUTOUP_KEEP_IMAGES', '1');
# Two Ways to Really Bypass Backup in Your Setup
Option 1 — Patch BackupDb.php (cleanest)
Navigate to the file:
modules/autoupgrade/classes/Task/Upgrade/BackupDb.php
Edit it and change the run() method like this:
```
public function run()
{
// 🔧 Bypass database backup step completely
$this->next = 'upgradeFiles';
return true;
}
```
That makes the upgrader skip straight to file upgrade.
Option B — Hardcode in Config
Open:
modules/autoupgrade/classes/UpgradeConfiguration.php
Find where defaults are defined (look for $defaults = [...] or a get() fallback).
Add/modify:
'skip_backup' => true,
'PS_AUTOUP_BACKUP' => false,
@jasperf
Copy link
Author

jasperf commented Aug 16, 2025

autoupgrade/cli-upgrade.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment