Setup Automatic Seach Indexing in cPanel

This article explains how to configure automatic search indexing using the Command Line Indexer and cPanel. These instructions should be useful even if your host does not use cPanel with a few adjustments.

Preparing the Command Line Indexer

The first thing we need to do to setup automatic indexing is download a copy of the Command Line Indexer from the Finder downloads page. Once the Command Line Indexer has been downloaded, unpack the archive using your favorite zip tool to reveal the "finder" folder.

Command Line Indexer Download

Next, upload the entire "finder" folder to your web host. The finder folder must be in the same directory as your site's configuration.php file. See the highlighted items in the image below. If the folder is not uploaded to the correct location, it will not work.

Command Line Indexer Upload

Setting up the Cron Job

Now that the Command Line Indexer is uploaded to your web host, we need to configure automatic indexing with cPanel's Cron Jobs tool. Log in to your cPanel Control Panel, scroll to the bottom and click the "Cron Jobs" button under the Advanced Tools header. This might vary depending on the version of cPanel your web host is using but it should look something like the image below. You can check out cPanel's documentation on Cron Jobs if you need more help.

cPanel Advanced Tools

That will take you to a screen explaining what a Cron Job is and warning that you might need a good understanding of Linux commands before you can use Cron Jobs effectively. If prompted for your experience level, choose "Standard" to make things a bit easier. That should take you to a new screen with a bunch of fields on related to periods of time such as "Minute", "Month", etc. Fill in the form to match the screen shot below.

cPanel Cron Jobs

Using these settings, the indexer will be run every day, 365 days a year, at 3:00 AM. You can adjust these settings to your needs once you've confirmed that it is working.

There might also be a field to enter an e-mail address that will be sent an e-mail once the job is complete with whatever output is generated. We recommend that you enter an e-mail address so that you can verify that it is working and that no errors are being generated. However, you might want to turn it off once you've verified that it is working unless you want to receive e-mails everyday at 3:00 in the morning. Once you're done filling in the form, press the "Save Crontab" button.

Securing the Command Line Indexer

Lastly, we need to secure the Command Line Indexer from unauthorized access. You can do this easily with Web Protect tool under the Security header of your Control Panel. Clicking on the Web Protect button will take you to a screen with a list of directories, click the icon next to the "public_html" directory which will take you to another screen with different directories in it. From there, click on the "finder" text. This will take you to a new screen which will allow you to password protect the directory from web access. Click the check box to "password protects this directory" and enter some name for the secure area and press the save button. You do not have to create any users that should be able to access the directory from the web.

cPanel Web Protect

That's it, you're done! Sit back and enjoy your regularly updated Finder index.