Joomla comes with a search component that can look inside articles and other components. However, the search component does have some limitations. For example, it can't index content that is included in modules or plugins.
To search through all of the content on your Joomla pages, Google Search Engine provides a powerful alternative.
In this tutorial, I'm going to show you how to integrate Google Search Engine in Joomla.
Step #1. Install the ITP Google Search extension
We're going to use an extension called ITP Google Search.
Go to the extension page and scroll down to download it.
- Login to your Joomla administrator area.
- Go to Extensions > Manage.
- Upload a Package File.
- Browse the zip you just downloaded.
- Click "Upload and Install" button.
Step #2. Get the Search Engine ID
Go to the Google Custom Search Engine page.
If you don't have a Google account, click "Sign in to Custom Search Engine" button and continue the process. On the other hand, if you're already logged in, click "Add".
Fill in the required fields:
- Sites to search. Type the URLs of the sites where you want to use the Google search box.
- Choose the language.
- The name of the search engine.
- When you're done, click "Create" button to reach the success page.
- Click "Control Panel".
- Click the "Search engine ID" button.
- Copy your search engine ID.
Step #3. Configure ITP Google Search
- Go to Components > ITP Google Search.
- Click "Options" in the right-top of the screen.
- Paste the Search Engine ID from the previous step.
- Save and close.
Step #5. Create a module
Let's display the search form on our website:
- Go to Extensions > Modules > New.
- Choose the "ITP Google Search" module type.
- Show or hide the Search button.
- Choose a valid module position and enable it in all pages.
- Click Save and close.
Step #6. End result
Go to your public site and test the search form.
The search results will be displayed right away.
Note on using Google Search
There are some disadvantages to using Google Search:
- Google won't be able to index and show search results for private content on your site.
- You have less control over your customization of the search.
- There may be a delay in showing items in Google's search results, as you wait for Google to index the site.