How to create Google Maps API key for a website using WordPress

Andrew Martyn
2 min readJun 28, 2023

--

To create a Google Maps API key for a website using WordPress, you can follow these steps:

  • Go to the Google Cloud Platform Console: Visit the Google Cloud Platform Console at https://console.cloud.google.com/ and log in with your Google account.
  • Create a new project: If you don’t have a project yet, create a new one by clicking on the project drop-down menu at the top of the page and selecting “New Project.” Give your project a name and click “Create.”
  • Enable the Google Maps Platform: Once your project is created, click on the project drop-down menu again and select your newly created project. Then, click on the “Enable APIs and Services” button.
  • Search for Google Maps Platform: In the search bar, type “Google Maps Platform” and click on it in the results.
  • Enable the necessary APIs: Enable the APIs you require for your website, such as the “Maps JavaScript API” for displaying maps or the “Geocoding API” for converting addresses to coordinates. You may need to enable multiple APIs depending on your needs.
  • Create an API key: After enabling the required APIs, click on the “Credentials” tab in the left sidebar. Then, click on the “Create Credentials” button and select “API key.”
  • Restrict your API key (optional): It’s recommended to restrict your API key for security purposes. You can restrict it by specifying HTTP referrers (websites that are allowed to use the API key) or by restricting API usage to specific APIs. This step is optional but highly recommended.
  • Copy your API key: Once your API key is created, copy it to your clipboard.
  • Add the API key to your WordPress website: In your WordPress admin dashboard, go to “Appearance” -> “Widgets” or “Theme Options” depending on your theme. Look for a widget or option related to Google Maps or API key configuration. Paste your API key in the designated field and save the changes.

--

--

Andrew Martyn

Hi, I'm Andrew - a web designer, developer and Digital marketer. Currently working at HGS Infotech as a Project manager.