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 ships with a local/ directory that is the designated home for every institutional customization. Rather than editing files inside the VuFind source tree, you copy only the files you need to change into local/ and modify them there. VuFind’s file-resolution logic checks local/ first and falls back to the core installation, so your overrides take precedence transparently. As the local/README.txt in the VuFind repository states:
All of your local configurations and customizations belong in this directory and its subdirectories. Rather than modifying core VuFind files, you should copy them here and modify them within the local directory. This will make upgrades easier.

How the override system works

When VuFind looks up any configuration file, template, or language string, it checks the local directory path before the module or core path. The first matching file wins.
Request for config/vufind/config.ini


local/config/vufind/config.ini   ← checked first (your overrides)
        │ (not found)

config/vufind/config.ini         ← core file used as fallback
This means you never risk overwriting a file during a git pull or a package upgrade, because your customizations live outside the tracked source tree.

The local/ directory structure

The local/ directory mirrors the structure of the core VuFind installation for configuration and languages, and mirrors the theme directory for templates:
local/
cache/
config/
vufind/
harvest/
DirLocations.ini.dist
README.txt
You may also create local/languages/ for translation overrides and local/themes/ if your deployment places custom themes there rather than in the main themes/ directory.

Overriding configuration files

1

Identify the file to override

All VuFind configuration files live in config/vufind/. Find the file that contains the setting you want to change. The main configuration file is config/vufind/config.ini.
2

Copy it to local/

Copy the file into the matching path under local/config/vufind/:
cp config/vufind/config.ini local/config/vufind/config.ini
3

Edit the local copy

Open local/config/vufind/config.ini and make your changes. For example, to set the site title and activate your custom theme:
local/config/vufind/config.ini
[Site]
title  = "My University Library"
theme  = mytheme
url    = https://catalog.myuniversity.edu/vufind
email  = library@myuniversity.edu
You do not have to keep the entire file. For INI files, VuFind merges your local version on top of the core version section by section, so you can keep only the sections and keys you actually want to change. However, copying the entire file is also safe and makes it easier to see everything at a glance.

Commonly overridden configuration files

Controls site title, theme, language, ILS connection, authentication, and hundreds of other global settings. The [Site] section is the most frequently customized.
local/config/vufind/config.ini
[Site]
title    = "My Library Catalog"
theme    = mytheme
language = en
timezone = "America/Chicago"
Defines available search handlers, sort options, result limits, and facets for the primary Solr search backend.
Controls which facets appear on search results pages, their labels, and their display order.
Configures which tabs (Holdings, Description, Staff View, etc.) appear on individual record pages and in what order.
Defines role-based access rules for admin pages, debug mode, and other protected features.
Connection settings for your integrated library system go in a driver-specific config file such as Horizon.ini, Symphony.ini, or Folio.ini.

Overriding templates

Templates control the HTML markup for every page in VuFind. They are .phtml files (Laminas/Zend view scripts) located under a theme’s templates/ directory. VuFind resolves templates by walking the active theme’s inheritance chain, so you can override a template at either the theme level or at the local level.
The preferred approach: place the modified template inside your theme’s templates/ directory. This keeps overrides scoped to the theme.
# Copy the template you want to modify from its source theme
cp themes/bootstrap5/templates/search/results.phtml \
   themes/mytheme/templates/search/results.phtml

# Edit the copy
nano themes/mytheme/templates/search/results.phtml
The bootstrap5 theme provides templates for every part of the interface. Key subdirectories include:
DirectoryContains
templates/layout/Page frame, header, footer wrappers
templates/header.phtmlTop navigation and search bar
templates/footer.phtmlFooter content
templates/search/Search home, results, and related pages
templates/record/Individual record detail pages
templates/myresearch/User account pages
templates/content/Static content pages
templates/Auth/Login and registration forms
templates/RecordTab/Individual record tabs (Holdings, Description, etc.)
Every overridden template is a snapshot of the original at the time you copied it. When VuFind is upgraded, review your overridden templates against the upstream versions and merge in any bug fixes or new features manually. Minimize the number of overridden templates to reduce this maintenance burden.

Overriding language strings

Language files live in languages/ and use a simple INI key = "value" format. To customize displayed text, copy the relevant language file into local/languages/ and change only the strings you need.
mkdir -p local/languages
cp languages/en.ini local/languages/en.ini
Edit the copy to change specific strings:
local/languages/en.ini
Add to favorites = "Save to My List"
title_wrapper   = "%%pageTitle%% — My University Library"
You only need to include the keys you want to override. VuFind merges local/languages/en.ini on top of languages/en.ini, so any key not present in your local file falls back to the core translation.
See the Translations page for full details on the language system, file format, and adding new languages.

Best practices for upgrade safety

1

Keep local/ outside version control of the core

Do not commit your local/ changes into the main VuFind Git repository. Instead, maintain a separate Git repository (or subtree) for local/, or use a deployment tool that manages it independently.
2

Override only what you must

Every file you copy into local/ or into a custom theme becomes a file you are responsible for maintaining. Where possible, use configuration settings rather than template overrides, because config files are far easier to merge during upgrades.
3

Document your changes

Add comments inside your local files explaining why you overrode that particular setting or template block. Future maintainers (and future you) will thank you.
local/config/vufind/config.ini
[Site]
; Customized 2024-03-15: use institutional branding
title = "My University Library"
theme = mytheme
4

Review upstream diffs on upgrade

After upgrading VuFind, diff your local overrides against the new core files to identify anything that needs to be merged:
diff config/vufind/searches.ini local/config/vufind/searches.ini
5

Use the local cache directory

VuFind writes compiled and cached files to local/cache/. Never commit this directory; add it to .gitignore. Clear it when you change theme or asset pipeline settings:
rm -rf local/cache/public/*

Example: overriding the search results page title

Here is a complete walkthrough of overriding one specific template to add your institution’s name to search result page titles.
1

Find the template

The page <title> element is managed by the layout template. Locate it:
ls themes/bootstrap5/templates/layout/
2

Copy to your theme

mkdir -p themes/mytheme/templates/layout
cp themes/bootstrap5/templates/layout/layout.phtml \
   themes/mytheme/templates/layout/layout.phtml
3

Make a targeted edit

Open the copied template and modify only the specific block you need. Leave the rest of the file unchanged so that future merges are as small as possible.
4

Test in your browser

Activate your theme in local/config/vufind/config.ini and reload the page to verify the change.

Build docs developers (and LLMs) love