Search
Enter at least two characters without personal information.

    LibraryArticles & FAQ Your projectRequest a quote
    LanguageEN
    Practical guides

    Clean up a web project without breaking the website

    A large folder cannot be cleaned safely from filenames alone. Separate what serves visitors, what builds the site and what records interventions; check dependencies before deleting anything.

    Go to the method

    Two people reviewing a laptop
    AI-generated illustration

    Inventory files by purpose

    Fictional chain: index.php reads catalogue.json, whose configuration selects the view.php template.
    Illustration · Fictional indirect dependency: the entry file reads the catalogue and selects an allowed template. A template name missing from the entry file does not establish that it is unused.

    Start with public pages and follow their includes, stylesheets, scripts and datasets. Add routes defined in server configuration and files loaded from calculated names. A photograph may be selected through a catalogue without appearing directly in the page code.

    In a PHP project, include and require load other files, so a folder named scripts may contain essential code. Preserve configuration, secrets, keys and access settings. Generated files, such as translation dictionaries or image manifests, may also be needed on every page view.

    Choose deletions you can explain

    For each candidate, record its purpose, the references checked and the reason for removal. Audit screenshots and local reports are often candidates; an optimized image or font needs further checking. Compare the contents of copies before treating them as duplicates.

    A missing literal reference does not prove that a file is unused: examine assembled paths, JSON lists and responsive variants. Work in small groups on a restorable copy. Keep a file when its dependencies remain uncertain and record what is needed to decide.

    Fictional example: index.php reads catalogue.json, whose internal configuration selects view.php from permitted templates. The name view.php may therefore be absent from the entry file while remaining essential. Follow the chain from entry point through data, template selection and includes. The diagram describes this teaching example; it does not suggest loading an unrestricted visitor-supplied path.

    Then classify candidates by available evidence. A photo-640.webp variant may be selected through srcset without appearing in the main template. A cache requires knowing its producer and rebuild conditions; its name does not make it disposable. An audit screenshot used only in a report can be kept outside the delivered folder after checking. Validate each decision on a restorable copy, with the relevant languages and screen sizes.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Fictional inventory: decide from dependencies
    CandidateEvidence found or missingDecision before delivery
    view.phpTemplate selected by internal configurationKeep it with its loading chain
    photo-640.webpVariant referenced in srcset or the data producing itKeep and test screen sizes
    capture-audit.pngReport-only use; no production use established after reviewArchive outside delivery if the evidence is sufficient
    cache/catalog.jsonRebuild and network dependencies unverifiedKeep until rebuilding is validated

    Verify and deliver a clean project

    After each group is removed, open the main page families in every language. Check images, downloads, fonts, the sitemap, feeds and interactive features. Compare the results with the behaviour observed before cleanup, on a phone and a computer.

    Record the file count, completed checks and limitations. Store backups outside the public root with suitable protection. Delete temporary verification files and stop test servers; production content, data and dependencies remain in the project.

    Reference documents

    Content updated on

    Acceptance matrix to adapt to your project

    These proposed checks use synthetic cases. Decide the required behaviour with the team, record the result and assign unresolved gaps before release.

    Scroll the table horizontally to read every column. With a keyboard, focus the table area and use the arrow keys.

    Test cases, expected outcomes and useful evidence
    CaseExpected outcomeEvidence to retain
    Included fileThe page renders without warnings or errors.Included-file path, discovered callers and rendered dependent pages after cleanup.
    Responsive imageEvery variant in the manifest exists.Checked paths and dimensions.
    Translated pageContent, navigation and links work.Language, URL and checked action.

    Frequently asked questions

    Should every folder named scripts or tools be deleted?

    No. Its name does not establish its purpose. Follow calls from pages, configuration and data; remove only items whose role has been established.

    Can the cache be deleted without checking?

    Some caches regenerate; others store necessary data or need network access to rebuild. Check how they are created and replaced before deleting them.