Configure a search by Wordpress blog posts

Go to Search > Manage Search Indexes and press the button Add New. From the dropdown list select Wordpress Blog and fill in fields. Press Save and Continue Edit.

After the index is created, you can change it's settings:

  • Title - the title of the search index (displayed in the tab).
  • Position - the position of the tab to display in search results.
  • Active - if it is active, the search index will be displayed in search results.
  • Attributes - the post's attributes with their weights be used for search.
  • Table Prefix - the prefix for wordpress tables.
    if in database table names are like wp_posts, then prefix should be wp_.
  • Base Url - the full URL for your posts with dynamical variables:
    • {ID}
    • {post_author}
    • {post_date}
    • {post_date_gmt}
    • {post_title}
    • {post_status}
    • {post_type}
    • {post_name}
    • {guid}
    • {category_name}
    • {category_slug}
    • {Y} - post date year, e.g. 2018
    • {m} - post date month, e.g. 08
    • {d} - post date day, e.g. 23

Typical base urls:

  • http://example.com/blog/{post_name}.html
  • http://example.com/blog/?p={ID}
  • http://example.com/{category_slug}/{post_name}.html
  • Database Connection Name - the connection name for wordpress database. If wordpress is installed on same database, the correct value is default_setup. If wordpress uses another database, then you need to create a new connection in app/etc/local.xml and to set a database connection name to the name of this connection. To create a new connection see Create a connection to another database.
Advanced Sphinx Search Pro