Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/vufind-org/vufind/llms.txt

Use this file to discover all available pages before exploring further.

VuFind exposes its administrative functions through a set of Symfony Console commands registered in the VuFindConsole module. Every command is invoked through the PHP front controller:
php $VUFIND_HOME/public/index.php <command> [arguments] [options]
Running the entry point without arguments lists all available commands. Append --help to any command for its full argument and option documentation.
# List all commands
php $VUFIND_HOME/public/index.php

# Show help for a specific command
php $VUFIND_HOME/public/index.php util/commit --help
Set VUFIND_LOCAL_DIR before running any command that reads configuration files. Without it, VuFind falls back to the base installation defaults and may ignore your local overrides.

Import commands

These commands index records from files into Solr without using the shell-level import-marc.sh script.
Imports records from a CSV file into Solr according to a CSV import configuration file.
php $VUFIND_HOME/public/index.php import/import-csv <csv-file> <config-file>
Arguments
ArgumentDescription
csv-filePath to the CSV file to import
config-filePath to the CSV import configuration (.ini) file
Options
OptionDescription
--test-onlyPerform a dry run without writing to Solr
Example
php $VUFIND_HOME/public/index.php import/import-csv \
    /data/new-records.csv \
    $VUFIND_HOME/import/csv.ini
Transforms XML metadata records using an XSLT stylesheet and indexes the result into Solr. Used for Dublin Core, OJS, DSpace DIM, and other XML formats.
php $VUFIND_HOME/public/index.php import/import-xsl <xml-file> <properties-file>
Arguments
ArgumentDescription
xml-filePath to the XML source file
properties-filePath to the import .properties file (e.g. ojs.properties)
Options
OptionDescription
--test-onlyDry run; reports what would be indexed without writing to Solr
Example
php $VUFIND_HOME/public/index.php import/import-xsl \
    /data/ojs-records.xml \
    $VUFIND_HOME/import/ojs.properties
Pre-built properties files in import/ include: ojs.properties, dspace.properties, dspace-dim.properties, doaj.properties, ndltd.properties, gsdl.properties, and others.
Indexes web content collected by the built-in crawler into the website Solr core.
php $VUFIND_HOME/public/index.php import/webcrawl

Harvest commands

Harvests metadata records from OAI-PMH sources defined in oai.ini and writes the results to the harvest directory.
php $VUFIND_HOME/public/index.php harvest/harvest_oai [options]
Key options
OptionDescription
--iniSection name in oai.ini to harvest, or a path to an alternative .ini file
--fromOverride the start date for incremental harvest (format: YYYY-MM-DD)
--untilOverride the end date for incremental harvest
--verboseOutput detailed progress information
Example
# Harvest all sources
php $VUFIND_HOME/public/index.php harvest/harvest_oai

# Harvest one source
php $VUFIND_HOME/public/index.php harvest/harvest_oai --ini MyRepository

# Re-harvest a specific date range
php $VUFIND_HOME/public/index.php harvest/harvest_oai \
    --ini MyRepository \
    --from 2024-01-01 \
    --until 2024-03-31
Merges multiple harvested MARC XML files into a single combined file. Useful when a repository returns one file per record and you need a single combined input for import-marc.sh.
php $VUFIND_HOME/public/index.php harvest/merge-marc <directory>
Arguments
ArgumentDescription
directoryPath to the directory containing the MARC XML files to merge
Example
php $VUFIND_HOME/public/index.php harvest/merge-marc \
    $VUFIND_LOCAL_DIR/harvest/MyRepository

Language commands

These commands help manage VuFind’s language translation files.
Sorts and standardises a language file or all files in a language directory, ensuring consistent key ordering and formatting.
php $VUFIND_HOME/public/index.php language/normalize <target>
Arguments
ArgumentDescription
targetPath to a single .ini language file, or to a directory of language files
Example
php $VUFIND_HOME/public/index.php language/normalize \
    $VUFIND_LOCAL_DIR/languages/de.ini
Copies a translation string from one language file to another, optionally across all installed language files.
php $VUFIND_HOME/public/index.php language/copystring <source> <target> <key>
Example
php $VUFIND_HOME/public/index.php language/copystring en.ini de.ini my_custom_key
Removes a translation key from a language file or from all language files in a directory.
php $VUFIND_HOME/public/index.php language/delete <target> <key>
Example
php $VUFIND_HOME/public/index.php language/delete \
    $VUFIND_LOCAL_DIR/languages \
    obsolete_key
Adds a new translation string to all language files by deriving a value from an existing string using a substitution template. Useful for creating variants of existing strings.
php $VUFIND_HOME/public/index.php language/addusingtemplate \
    <source-key> <new-key> <template>
Example
php $VUFIND_HOME/public/index.php language/addusingtemplate \
    "Search Results" \
    "Search Results for %%token%%" \
    "Search Results for %%token%%"

Upgrade commands

Migrates VuFind configuration files from an older version to the current version, merging local settings into the new defaults and reporting conflicts.
php $VUFIND_HOME/public/index.php upgrade/config [options]
Key options
OptionDescription
--fromVuFind version of the old installation to migrate from
--toTarget VuFind version (defaults to installed version)
--olddirPath to the old VuFind configuration directory
--newdirPath to the destination local configuration directory
Example
php $VUFIND_HOME/public/index.php upgrade/config \
    --from 9.0 \
    --olddir /old/vufind/local \
    --newdir $VUFIND_LOCAL_DIR
Applies pending database migrations to bring the VuFind database schema up to the current version.
php $VUFIND_HOME/public/index.php upgrade/database [options]
Key options
OptionDescription
--no-interactionRun non-interactively; accept all defaults without prompting
Example
php $VUFIND_HOME/public/index.php upgrade/database --no-interaction

Utility commands

Sends a commit request to Solr, making all indexed documents visible to searches.
php $VUFIND_HOME/public/index.php util/commit [core]
Pass an optional core name argument to commit a specific core rather than the default biblio.
php $VUFIND_HOME/public/index.php util/commit authority
Sends an optimize request to Solr, merging index segments for improved read performance.
php $VUFIND_HOME/public/index.php util/optimize [core]
Optimization is an expensive, long-running operation. On large collections it can take hours and temporarily doubles disk usage. Schedule during low-traffic windows.
Removes a set of records from the Solr index.
php $VUFIND_HOME/public/index.php util/deletes <filename> <format>
Arguments
ArgumentDescription
filenameFile containing records or IDs to delete
formatflat (one ID per line), marc (binary MARC, reads 001), or filename (SolrMarc delete format)
Example
# Delete by flat ID list
php $VUFIND_HOME/public/index.php util/deletes /data/deleted-ids.txt flat

# Delete from a MARC file
php $VUFIND_HOME/public/index.php util/deletes /data/deleted.mrc marc
Queries the ILS for records that have been suppressed and removes them from the Solr biblio index.
php $VUFIND_HOME/public/index.php util/suppressed [options]
Options
OptionDescription
--batchsizeNumber of IDs to process per Solr delete request (default: 1000)
Populates the Solr reserves core with course reserve data from the ILS or a CSV file.
php $VUFIND_HOME/public/index.php util/index_reserves [options]
Options
OptionDescription
--csvPath to a CSV file to import instead of querying the ILS
--delimiterField delimiter for CSV input (default: ,)
--templatePath to a CSV template file describing column mappings
Pre-builds hierarchy tree XML for all hierarchical records and stores it in the VuFind cache. Without this, trees are built on demand which can be slow for large collections.
php $VUFIND_HOME/public/index.php util/createHierarchyTrees [record-id]
Pass an optional record ID to rebuild only a single tree:
php $VUFIND_HOME/public/index.php util/createHierarchyTrees my.collection.001
Generates XML sitemaps from the Solr biblio index for submission to search engines.
php $VUFIND_HOME/public/index.php util/sitemap [options]
Options
OptionDescription
--baseurlOverride the base URL set in config.ini
--outputdirDirectory to write sitemap files to
Validates MARC records against MARC21 rules and reports structural or encoding errors without importing them.
php $VUFIND_HOME/public/index.php util/lint_marc <file>
A family of commands purges expired rows from various database tables. Run them on a schedule to keep the database lean.
CommandDescription
util/expire_access_tokensRemove expired OAuth access tokens
util/expire_auth_hashesRemove expired authentication hashes
util/expire_external_sessionsRemove expired external session records
util/expire_login_tokensRemove expired “remember me” login tokens
util/expire_oai_resumptionRemove expired OAI-PMH resumption tokens
util/expire_searchesRemove expired saved searches
util/expire_sessionsRemove expired user sessions
util/expire_audit_eventsRemove old audit event log entries
All expiry commands accept a --lifespan option (in days) to control how old records must be before deletion, and a --batch-size option.
php $VUFIND_HOME/public/index.php util/expire_sessions --lifespan 30

Common workflows

Nightly incremental import

# 1. Harvest new records
php $VUFIND_HOME/public/index.php harvest/harvest_oai

# 2. Import harvested MARC records
$VUFIND_HOME/harvest/batch-import-marc.sh MyRepository

# 3. Process any deletions
$VUFIND_HOME/harvest/batch-delete.sh MyRepository

# 4. Commit so new records become searchable
php $VUFIND_HOME/public/index.php util/commit

# 5. Rebuild alphabetic browse
$VUFIND_HOME/index-alphabetic-browse.sh

Purge expired database rows

php $VUFIND_HOME/public/index.php util/expire_sessions --lifespan 30
php $VUFIND_HOME/public/index.php util/expire_searches --lifespan 30
php $VUFIND_HOME/public/index.php util/expire_access_tokens
php $VUFIND_HOME/public/index.php util/expire_login_tokens

Build docs developers (and LLMs) love