When you use Google Maps with GEO my WP, create two Google Maps Platform API keys: a browser key for maps, address suggestions and browser address lookups, and a server key for address lookups made by WordPress. Each key needs different restrictions.
GEO my WP 4.5.5.8 and later: enable Places API (New) in your Google Cloud project and allow it in your browser key's API restrictions for address autocomplete. The legacy Places API alone is not the required setup for the new autocomplete integration.
Create a project and enable billing
- Sign in to the Google Cloud Console.
- Use the project selector to choose your website's project, or choose New Project and create one.
- Open Billing and link the project to an active billing account. Google Maps Platform production use requires billing to be enabled, even if your usage stays within an applicable no-cost allowance.
- Keep this project selected when enabling APIs and creating both keys below.
If you already have working Google Maps keys, you can keep them. Check their project, enabled services and restrictions instead of creating replacements unnecessarily.
Enable the required Google Maps APIs
Open APIs & Services → Library. Search for each service below, open its page and select Enable. A service that is already enabled shows management options instead.
| API | Used for | Allow on these keys |
|---|---|---|
| Maps JavaScript API | Interactive Google maps in the browser. | Browser key. |
| Places API (New) | Address autocomplete in GEO my WP 4.5.5.8 and later. | Browser key. |
| Geocoding API | Converting addresses to coordinates and coordinates to addresses. | Browser and server keys. |
Enabling a service and allowing it on a key are separate steps. Complete both. These services cover maps, address lookups and autocomplete; add other APIs only when a feature or extension you use requires them.
Places API (New) and the legacy fallback
Starting with GEO my WP 4.5.5.8, address autocomplete uses Places API (New) first. For an existing project, enable that exact service and add it to the browser key's allowed APIs. You do not need to replace an otherwise correctly configured key.
A temporary compatibility fallback can use the legacy Places service when the new autocomplete service is unavailable or specifically blocked. This depends on the project's existing access to the legacy service and the browser key permitting it. For an existing integration that needs this fallback, keep Places API enabled and permitted alongside Places API (New).
The fallback does not replace the Places API (New) requirement and does not fix billing, invalid-key, website-restriction or quota problems. New Google customers may not have access to the legacy service, so configure Places API (New) for new installations.
These instructions describe the new integration in version 4.5.5.8 and later. Earlier GEO my WP releases use legacy autocomplete; enabling Places API (New) does not change the integration in an older plugin version. See Google's Places migration guidance.
Use separate restrictions for browser and server keys
The browser key is visible in browser requests by design. Protect it with Websites application restrictions. Keep the server key private and restrict it to the IP addresses your hosting server uses for outgoing requests. Do not use one key for both purposes.
The examples below use example.com. Replace it with your real domain. Include staging or development websites only if you intend to use that browser key there.
Create the browser API key
- In the selected project, open Google Maps Platform → Keys & Credentials. Depending on the console layout, you can also find keys under APIs & Services → Credentials.
- Choose Create credentials → API key. If asked to select API restrictions during creation, select Maps JavaScript API, Places API (New) and Geocoding API, then create the key.
- Open the created key's settings and give it a recognizable name, such as GEO my WP — Browser.
- Under Application restrictions, select Websites, also described as HTTP referrers.
- Add the website addresses where the key will be used. Include the domain and its path wildcard:
https://example.comandhttps://example.com/*. If the site also uses www, addhttps://www.example.comandhttps://www.example.com/*. Use the same pair of entries for a staging hostname if needed. The protocol and hostname must match the actual page. - Under API restrictions, select Restrict key and allow Maps JavaScript API, Places API (New) and Geocoding API. Keep legacy Places API permission only if your existing project needs the compatibility fallback.
- Save the restrictions and copy the key for the browser-key field in GEO my WP.
Create the server API key
- Return to the same project's credentials page and create a second API key. Select Geocoding API if API restrictions are requested during creation.
- Open this key's settings and name it GEO my WP — Server.
- Under Application restrictions, select IP addresses.
- Add your hosting server's public outbound IP address or addresses. Ask your host which addresses Google sees for outgoing requests from WordPress; the IP in your domain's DNS record may be different.
- Under API restrictions, select Restrict key and allow Geocoding API.
- Save the restrictions and copy this key for the server-key field in GEO my WP. Do not put it in frontend scripts or use website/referrer restrictions on it.
If your host uses changing outbound addresses, ask it how to provide stable addresses for IP-restricted API requests. For more information, see Google's API key security guidance.
Enter both keys in GEO my WP
- In WordPress, open GEO my WP → Settings → Maps & Geocoders.
- Choose Google Maps under Maps & Geocoding Provider.
- Paste the website-restricted browser key into Google Maps Browser ( client-side ) API key.
- Paste the private IP-restricted server key into Google Maps Server API key.
- Select Save Changes.
Test the server and browser features separately
- Open GEO my WP → Tools → API Testing and select Test Google Maps Server API Key. This checks server-side geocoding, not browser maps or autocomplete. See the server-key testing guide for details.
- Open a page that uses a GEO my WP Google map and confirm that the map loads.
- In a location form, test an address lookup and confirm that coordinates are returned.
- In an address field with autocomplete enabled, type part of an address, select a suggestion and check that its location is applied.
Allow a few minutes for Google Cloud API and restriction changes to take effect. Clear relevant site caches and reload the page. A successful server-key test does not validate the browser key or Places API (New).
Troubleshoot common setup problems
- Autocomplete is unavailable: confirm that the installed plugin version supports the new integration, Places API (New) is enabled in the browser key's project, and the browser key allows that service. Enabling only the legacy Places API is insufficient for the new integration.
- Website/referrer error: check the browser key's allowed protocol, hostname and paths, including any staging or www hostname in use.
- Server request denied: confirm that the server key allows Geocoding API and that its IP restrictions include the actual outbound addresses used by your host.
- API not enabled or not allowed: check both the project's enabled services and the individual key's API restrictions. Changing one does not automatically change the other.
- Billing or quota error: review the selected project's billing status and usage limits. The autocomplete compatibility fallback does not bypass these problems.
For browser failures, read the specific Google error in the browser console. Keep server keys and private diagnostic details out of public support posts.
Markers and duplicate Google Maps scripts
The Disable Google Maps Advanced Markers setting controls marker compatibility; it does not switch Places API (New) on or off. If another theme or plugin loads Google Maps, check for a second script using a different key or library configuration. Duplicate loads can interfere with maps and autocomplete even when the saved GEO my WP keys are correct.
