Short answer: no. Relevanssi can only access WordPress content.
For a longer answer, read on.
Only within single WP installation
Relevanssi only operates within one WordPress installation. Relevanssi Premium supports multisite searching, where the search can return posts from more than one subsite at once, but even in those cases the WordPress sites must be part of the same installation.
It’s not possible to search content that exists in another WordPress installation, not even if it’s on the same server.
No outside content
Relevanssi is heavily dependent on WordPress methods. When getting posts, Relevanssi uses the
get_post() function in WordPress and so on. Those functions cannot access anything outside the WordPress installation, whether it’s another WordPress installation, HTML files or external databases.
If you still need this…
If you really must have Relevanssi access outside data, there’s one way to achieve that: import the data inside your WordPress installation. Create a custom post type, import the data and have Relevanssi index the post type, and then in the search results change the links on the fly to point to the actual source and not the custom post type post.
For small amounts of data, this may be a feasible approach, if the data is available in a format that’s easily accessible.
2 comments Can Relevanssi access content outside WordPress?
Hi, is there a way to add a link to another website when searching for certain keywords? We have a few affiliates and we want to include a direct link to their websites in the search results when certain terms are searched for. How would I go about this?
Crickett, I wrote a guide for this. You can find it here.