- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
WordPress Troubleshooter. How tо fix “Google API key is invalid” error
May 22, 2015
Hello! This tutorial shows how to fix “Google API key is invalid” error.
WordPress Troubleshooter. How ti fix “Google API key is invalid” error
You may receive the following error on your site:
This page was unable to display a Google Maps element. The provided Google API key is invalid or this site is not authorized to use it. Error Code: InvalidKeyOrUnauthorizedURLMapError
Let’s learn how to get rid of it.
-
Access your WordPress admin panel and navigate to Appearance ->Editor tab.
-
On the appeared screen locate the static-map.php file in the list on the right:
-
Click on the file title to open it for editing.
-
On the appeared interface locate the following line of code:
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyASm3CwaK9qtcZEWYa-iQwHaGi3gcosAJc&sensor=false"></script>
Replace it with the following:
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
Click the “Update File” button in the lower part of the screen to save changes.
Open your site and refresh the page. You can see the error is no longer displayed.
This is the end of the tutorial, you have learnt how to fix “Google API key is invalid” error.
Feel free to check the detailed video tutorial below:
WordPress Troubleshooter. How ti fix “Google API key is invalid” error