Resetting contents
The demo import does not overwrite any existing contents. To import a demo again or to put an installation back into the state right after a fresh install, there are two ways.
Both commands delete contents. A database backup is created automatically beforehand – only turn it off if you are sure.
Deleting all contents (creuva:reset)
In the back end, this corresponds to the option “Delete all contents first” under Layout › Creuva › Set up.
- All Contao tables are emptied: site structure, articles, content elements, themes, modules, layouts, forms, news, versions, search index etc. The IDs start at 1 again.
- Back end users and user groups, members and member groups and the file manager are kept.
- Of the files, only the demo folder
files/creuva-demois deleted. - The backup is stored under
var/backups/creuva-reset__<timestamp>.sql.gz; restore it withcontao:backup:restore <file name>. - Without confirmation (e.g. in scripts):
--force, without backup:--no-backup.
Replacing one website of a multisite installation (--replace)
--reset deletes all websites. If several websites run in one installation, --replace only replaces the
website that the import would create:
This deletes the website roots with the same domain and language including their subpages and contents, the theme
with the name from --theme-name and the themes whose layouts this website uses, as well as forms, news archives
and calendars – but only if no other website uses them.
- If the theme is also used by another website, the command aborts without deleting anything.
- Before deleting, the command lists all affected records and asks for confirmation.
- Files are kept; the import overwrites the demo files, their UUIDs stay the same.
- If there is no matching website yet,
--replacesimply creates it. - Cannot be combined with
--resetand--root; requires--demoor--with-pages.
Afterwards, rebuild the search index with contao:crawl.