WordPress, a free and open-source content management system that is used to build and deploy websites. There are many templates and plugins available that reduce the development and deployment costs. One such feature is the search functionality but it is found lacking in many areas because of which google site search is preferred over this.

Why use Google Custom Search?

WordPress has many plugins for including the search widget but all of them have the same problem and that is managing them. It can consume a lot of server resources and hence impact the website. But the same cannot be said of the Google search engine. It is free of charge and it allows to limit the search only to relevant sites. Moreover, Google is a company that has a great reputation and is trustworthy. It is fast and there is no need to maintain or update the search engine, it is done automatically. Additionally, it is easy to add it to your site created by WordPress.

Adding Google Custom Search to WordPress Site

Here is a step by step instructions on adding Google custom search:

  • Install and activate the plugin: The foremost thing to do is to download and install the plugin made for WP. The plugin can be searched using the search field or can use the plugin page on the admin dashboard can be used to install it. Once it is installed it shows an activation button, clicking on it will activate the plugin.
  • Setting it up: Now the plugin is installed and activated. The next step is to set it up so that it starts running. To do that go to Settings – WP Google Search. This option is only available after activation. On this page, there are a few options to fill out but before that one has to get a Google Search Engine ID.
  • Getting a Google Search Engine ID: Obtaining an Id can be done by visiting the Google Custom search website. When on the site there is a link called ‘New Search Engine’ on the left. Use that link to get your ID which is a simple process. A few things need to be provided to get your ID. The URL of your WordPress site has to be provided in the ‘Sites to Search’ option. Choose the language of your website and click on create which will show a success message. Now click on the control panel button to edit the search engine. Here you can copy the search engine ID.
  • Edit the look and feel: On the left-hand side, there is the Edit Search Engine under which there is a ‘Look and Feel’ tab. Click on that to get many tabs like Layout, Themes, Customize, and Thumbnails. In the Layouts tab click on the ‘Results only’ option or whatever option that you want to choose and click save once you are done editing.
  • Paste the search engine ID: Paste the engine Id on the WP Google Search page and click on Save changes to store the settings. This will show the Google search Widget on the available widgets list. Drag and drop this to a sidebar where the search box has to be displayed.

The Google search can also be added manually by making changes to the theme files in WordPress which is not recommended for beginners. For more customizations google custom search API can be used.