First of all install and activate WP Google Search plugin in your WordPress site.
After installing and activating the WP Google Search plugin, click on Settings >> WP Google Search. This will take you to the plugin's settings page.
Here you will have to enter your Google Search Engine ID. But do not worry, here we will tell you how you can get Google search engine ID.
#How to get Google Search Engine ID
To get a Google Search Engine ID, you have to go to the Google Custom Search website and click on the “Create a custom search engine” link on the left.
After clicking, a new page will open in front of you. Here in the “Sites to search” field enter the URL of your WordPress site. Next, select the language of the website. Then click on the “create” button.
Google will now create a custom search engine for you. Click on the Control Panel button.
Here you will see your search engine ID. You just need to click on the Copy to clipboard button, your search engine ID will be copied.
Click on the “Look and Feel” option to customize your Google search. Here you will see a lot of customization. You can customize it according to you.
After making all the settings click on the “Save” button.
Now login to your WordPress site again and go to Settings >> WP Google Search section and paste your Google Search Engine ID. After that click on “Save Changes” button.
Click on Appearance >> Widgets page and drag and drop the WP Google Search widget to the sidebar or where you want Google custom search to appear and click on the Save button.