Installing Search & Filter with Composer

Search & Filter and all its extensions can be installed using Composer, making it easy to manage plugin updates and deployments across multiple environments.

This guide covers installing the Free plugin, Pro plugin, and any extensions you have access to.

Overview

Our Composer repository provides access to:

  • Search & Filter – the free core plugin
  • Search & Filter Pro – the premium plugin with advanced features
  • Extensions – integrations for Elementor, Beaver Builder, Bricks, Avada, Divi, WPBakery, GenerateBlocks, and WPML

All packages require authentication, so you’ll need a valid Search & Filter Pro license before getting started.

Prerequisites

Before you begin, make sure you have:

  1. A valid Search & Filter Pro license
  2. Composer installed on your system
  3. Your license key activated for the site URL you’ll be using

To activate your license for a site, you can either activate it from within WordPress after a manual install, or add it via your account at:

My AccountManage SitesAdd Site.

Authentication Setup

Our Composer repository uses HTTP basic authentication. You’ll need to create an auth.json file in your project root (the same directory as your composer.json).

The auth.json file uses your license key as the username and your activated site URL as the password:

JSON
{
    "http-basic": {
        "license.searchandfilter.com": {
            "username": "your-license-key-here",
            "password": "https://yoursite.com"
        }
    }
}

Replace your-license-key-here with your license key, and https://yoursite.com with a site URL that has been activated for your license.

You can find your license key in your account under My Account → Licenses.

Keep Your License Key Private

If you’re using version control, add auth.json to your .gitignore file to prevent your license key from being committed to the repository:

Bash
auth.json

Make sure to create the auth.json file on any server where you’ll be running Composer commands.

Add the Repository

Add our Composer repository to your composer.json file:

JSON
{
    "repositories": [
        {
            "type": "composer",
            "url": "https://license.searchandfilter.com/composer/"
        }
    ]
}

Or add it via the command line:

Bash
composer config repositories.search-filter composer https://license.searchandfilter.com/composer/

Installing the Plugins

Core Plugins (Required)

Every Search & Filter setup requires both the free plugin and Pro plugin. Install them with:

Bash
composer require searchandfilter/search-filter searchandfilter/search-filter-pro

This installs both plugins to your wp-content/plugins/ directory.

Extensions

If your license includes access to extensions, you can install them as needed. Here are the available packages:

ExtensionPackage Name
Elementorsearchandfilter/elementor
Beaver Buildersearchandfilter/beaver-builder
Brickssearchandfilter/bricks
Divisearchandfilter/divi
Avadasearchandfilter/avada
WPBakery Page Buildersearchandfilter/wpbakery-page-builder
GenerateBlockssearchandfilter/generateblocks
WPMLsearchandfilter/wpml

For example, to install the Elementor extension:

Bash
composer require searchandfilter/elementor

Or install multiple extensions at once:

Bash
composer require searchandfilter/elementor searchandfilter/beaver-builder

Version Constraints

You can use standard Composer version constraints to control which versions are installed.

Lock to a specific version:

JSON
{
    "require": {
        "searchandfilter/search-filter": "3.1.6",
        "searchandfilter/search-filter-pro": "3.1.8"
    }
}

Allow minor version updates:

JSON
{
    "require": {
        "searchandfilter/search-filter": "^3.1",
        "searchandfilter/search-filter-pro": "^3.1"
    }
}

Allow only patch updates:

JSON
{
    "require": {
        "searchandfilter/search-filter": "~3.1.6",
        "searchandfilter/search-filter-pro": "~3.1.8"
    }
}

Customizing Install Locations

We use composer/installers to automatically install plugins to wp-content/plugins/. You can customize this location by adding the following to your composer.json:

JSON
{
    "extra": {
        "installer-paths": {
            "wp-content/plugins/{$name}/": ["type:wordpress-plugin"]
        }
    }
}

Installing as MU Plugins

If you’d prefer to install Search & Filter as must-use plugins (so they can’t be deactivated from the admin), you can change the install location:

JSON
{
    "extra": {
        "installer-paths": {
            "wp-content/mu-plugins/{$name}/": [
                "searchandfilter/search-filter",
                "searchandfilter/search-filter-pro"
            ]
        }
    }
}

WordPress doesn’t automatically load plugins from subdirectories within mu-plugins, so you’ll need to create a loader file. Create wp-content/mu-plugins/search-filter-loader.php:

PHP
<?php
/**
 * Plugin Name: Search & Filter MU Loader
 * Description: Loads Search & Filter plugins from mu-plugins subdirectories
 */

require_once WPMU_PLUGIN_DIR . '/search-filter/search-filter.php';
require_once WPMU_PLUGIN_DIR . '/search-filter-pro/search-filter-pro.php';

Build Systems and Environment Variables

If you’re using Composer in automated build pipelines where you can’t create an auth.json file, you can provide authentication via the COMPOSER_AUTH environment variable instead.

Set the variable with a JSON string matching the auth.json format:

Bash
export COMPOSER_AUTH='{"http-basic": {"license.searchandfilter.com": {"username": "your-license-key-here", "password": "https://yoursite.com"}}}'

This is particularly useful for CI/CD systems like GitHub Actions, GitLab CI, or similar platforms where you can store your license key as a secret.

Example: GitHub Actions

YAML
- name: Install Composer dependencies
  env:
    COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
  run: composer install

Example: GitLab CI

YAML
install:
  script:
    - export COMPOSER_AUTH="$COMPOSER_AUTH"
    - composer install
  variables:
    COMPOSER_AUTH: '{"http-basic": {"license.searchandfilter.com": {"username": "$SF_LICENSE_KEY", "password": "https://yoursite.com"}}}'

If you’re using Roots Trellis for deployments, you can use the Composer HTTP Basic Authentication feature supported by your Ansible vault.

Example composer.json

Here’s a complete example showing a typical Search & Filter setup with the core plugins and the Elementor extension:

JSON
{
    "name": "your-project/your-site",
    "description": "WordPress site with Search & Filter",
    "repositories": [
        {
            "type": "composer",
            "url": "https://license.searchandfilter.com/composer/"
        }
    ],
    "require": {
        "searchandfilter/search-filter": "^3.1",
        "searchandfilter/search-filter-pro": "^3.1",
        "searchandfilter/elementor": "^1.4"
    },
    "extra": {
        "installer-paths": {
            "wp-content/plugins/{$name}/": ["type:wordpress-plugin"]
        }
    }
}

Troubleshooting

Error 401: Unauthorized

This means your license key or site URL is incorrect. Double-check that:

  • Your license key is entered correctly in auth.json (no extra spaces)
  • The site URL matches exactly what’s activated in your account (including https:// or http://)
  • The site URL has been activated for your license via WordPress or My Account → Manage Sites

Error 402: Payment Required

This error indicates your license has expired or has no available site activations remaining. Log in to your account to check your license status and available activations.

Error 400: Bad Request

You’ve requested an invalid version. Check the available versions in our packages list and update your version constraint.

Authentication Issues in CI/CD

If you’re seeing authentication errors in automated builds:

  • Verify the COMPOSER_AUTH environment variable is set correctly
  • Make sure the JSON is properly escaped for your shell
  • Check that any secrets or environment variables are being passed to the build step

Plugin Not Loading After Install

If you’ve installed to a custom location or mu-plugins:

  • Verify the file paths are correct
  • For mu-plugins, make sure you’ve created the loader file
  • Check file permissions allow WordPress to read the plugin files