Skip to main contentSkip to footer

Relevanssi Premium as a Composer package

If you want to install Relevanssi Premium as a Composer package, you can use the following URL to fetch the latest version:

https://www.relevanssi.com/update/fetch_latest_version.php?api_key=XXX

Replace XXX with your valid API key. The URL will always return the latest version of the plugin files. If you want a specific version, you can use the following:

https://www.relevanssi.com/update/get_version.php?api_key=XXX&version=2.20.1

The Composer package should look something like this:

{ 
  "type": "package", 
  "package": {  
    "name": "relevanssi/relevanssi-premium",
    "version": "2.20.1", 
    "type": "wordpress-plugin",
    "dist": { 
      "type": "zip", 
      "url": "https://www.relevanssi.com/update/get_version.php?api_key=XXX&version=2.20.1"
    },
  } 
}

WP CLI also supports installing plugins from URLs. You can do this to install Relevanssi Premium:

wp plugin install https://www.relevanssi.com/update/fetch_latest_version.php?api_key=XXX

Both URLs support HTTP basic auth. If you don’t include the api_key parameter, you’ll be prompted for your user name and password. Use your Relevanssi.com account user name (not the login email) as the user name and your API key as the password. These can be stored in auth.json, so you can commit your composer.json without your API key leaking.

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

Indexing embedded PDFs for the parent post

…post_id FROM $wpdb->postmeta WHERE meta_key = ‘_wp_attached_file’ AND meta_value = %s )”, $pdf_url ) ); $content .= $pdf_content; } return $content; } DearFlip DearFlip uses a shortcode that points to the flipbook post, which has a custom field with the PDF URL: add_filter( ‘relevanssi_content_to_index’, ‘rlv_dearflip_content’, 10, 2 ); function rlv_dearflip_content(…

Showing the number of search results

If you want to show the number of search results found on the search results template, you can find the value in the variable $wp_query->found_posts. Just add <?php echo ‘<p>Found ‘ . $wp_query->found_posts . ‘ hits.</p>’; ?> in your search results template. In case that produces no results, try introducing……$wp_query->found_posts . ‘ hits.</p>’; ?> in your search results template. In case that produces no results, try introducing the global $wp_query variable like this: <?php global $wp_query; echo ‘<p>Found ‘ . $wp_query->found_posts . ‘ hits.</p>’; ?> The usual method which involves a new WP_Query object does not work with Relevanssi….

Related Posts:

Currently there are no related posts available.

Comment Section:

2 Comments. Leave new

  • Well, you can use the https://www.relevanssi.com/update/fetch_latest_version.php?api_key=XXX URL to always get the latest version. I wonder if that combined with “version: *” would do the trick? I don’t use Composer for plugins myself, so I don’t know all the tricks that well.

    Reply
  • Pace Corporation
    May 12, 2026 5:52 pm

    Hello!

    This is great that I can install Relevanssi Premium via Composer. However, it would be much better if this were a packagist type install so I did not have to manually update the version number in the composer.json. This makes it almost the same as updating the entire plugin manually.

    Is there a less manual way to keep the plugin updated to the latest version?

    Thanks.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed