Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Add Google Maps in WordPress (The RIGHT Way)

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to show Google Maps on your WordPress website?

If you’re running a local business, then displaying Google Maps on your site can help users easily find your location. It can also help improve your site’s search engine visibility so you can attract more website visitors.

In this article, we will show you how to add Google Maps in WordPress.

Add Google Maps in WordPress

Why Add Google Maps in WordPress?

Did you know that Google Maps is the most popular navigational app on all platforms?

If you have an office or physical store address, then adding Google Maps to your WordPress website makes it easy for users to quickly locate your physical stores, restaurants, or retail outlets. This helps you attract more customers and generate more business.

Not only that, but embedding Google Maps can also improve your WordPress SEO. According to Google, 46% of all searches are local. Adding Google Maps to WordPress can boost your local SEO and improve your visibility in local searches.

Now there are two ways to embed Google Maps in WordPress, and we’ll show you both.

The benefit of the second method is that it follows all local SEO best practices, so if you use it, then Google will start to include your location on Google Maps. It will also display your business information like name, logo, address, phone, and open hours in local search results.

That being said, let’s see how you can add Google Maps to WordPress. Below are the quick links that you can use to go to the section you prefer:

How to Add Google Maps in WordPress Without a Plugin

If you just want to quickly embed Google Maps in a WordPress post or page, then you can use the default iFrame method.

Simply go to the Google Maps website and type in any street address in the search area.

Find location in Google Maps and Click Share to Embed

Next, you need to click the Share icon, and it will show a popup with the option to either Send a location link or Embed a map.

You need to select the ‘Embed a map’ option.

Copy Google Maps HTML Embed Code

After that, simply copy the HTML code for Google Maps, and then open the page where you want to embed the map.

Inside the block editor, you need to add a Custom HTML block.

Select Custom HTML block in WordPress

Now you can simply paste the embed code you copied from Google Maps.

After that, you need to update or publish the page to preview the changes.

Google Maps iFrame Embed Code in Block Editor

This method works for quickly embedding Google Maps, but it doesn’t give you maximum SEO benefits.

If you are a small business, restaurant, or online store with either a single or multiple physical locations, then we recommend using the next solution to maximize your Local SEO rankings because it uses proper open graph data to help you rank higher in Google.

How to Add Google Maps to WordPress With a Local SEO Plugin

The best way to add Google Maps and optimize your site for local SEO is by using All in One SEO (AIOSEO).

It’s the best SEO plugin for WordPress because it helps you get higher SEO rankings without editing code or hiring a developer. Over 3 million professionals use AIOSEO to improve their search engine rankings.

AIOSEO

For this tutorial, we will be using the AIOSEO Pro version because it includes the Local SEO feature and other powerful optimization options. There is also a free version of AIOSEO that you can use to get started optimizing your site for search engines.

First, you’ll need to install and activate the AIOSEO plugin in WordPress. For more details, please see our tutorial on how to install a WordPress plugin.

Upon activation, the plugin will launch the setup wizard. You can click the ‘Let’s Get Started’ button to configure the plugin. If you need help, then please refer to our guide on how to properly set up All in One SEO in WordPress.

AIOSEO setup wizard

Next, you can head over to All in One SEO » Local SEO from your WordPress dashboard.

Then click the ‘Activate Local SEO’ button to get started configuring the local settings.

Activate local SEO

Once the Local SEO addon for WordPress is activated, you can add a single location or multiple locations in AIOSEO and display them on Google Maps. We’ll show you how to add both to your website.

Adding a Single Location

To add your locations, business information, open hours, and more, you first need to go to All in One SEO » Local SEO and open the ‘Locations’ tab.

If you have a single physical location, then keep the ‘Multiple Locations’ option set to No.

Location tab under local SEO

After that, scroll down to the ‘Maps’ section to pin your exact location.

Simply enter your address in the ‘Enter a query’ field, and Google Maps will show your location.

Pin your store location

Once you’ve entered your location, don’t forget to click the ‘Save Changes’ button.

Adding Multiple Locations

If you have more than one physical location, then you’ll need to enable the ‘Multiple Locations’ setting in the ‘Location’ tab in Local SEO.

Enable multiple locations

After that, a new Locations menu will appear in your WordPress admin panel.

Go ahead and navigate to Locations and then click the ‘Add New’ button.

Add a new location

Once you are in the WordPress editor, scroll down to the ‘Map’ section.

Here you can enter your address in the ‘Enter a query’ field.

Add multiple map locations

After entering your location on the map and adding location information, go ahead and click the ‘Publish’ button.

You can now repeat this step and add as many locations as you want for your business.

Once you have finished adding your locations, you can go to the ‘Maps’ tab back in the All in One SEO » Local SEO menu.

Here you will have to enter a Google Maps API key.

Enter Google maps API key

Now, let’s see how to create an API key for Google Maps.

Creating a Google Maps API Key

To start, you’ll need to visit the Google Maps Platform website and click the ‘Get Started’ button.

Google maps platform

After signing in with your Google account, you’ll need to set up a billing account.

Google Maps Platform has pay-as-you-go pricing, and they offer the first $300 of monthly usage for free for all users. For most websites, that will easily cover a simple map embed like the one we’re creating in this tutorial.

Don’t worry, they will not charge you any fees unless you manually upgrade to a paid account.

To get started, go ahead and click the ‘Create Billing Account’ button.

Create a billing account

Next, you can select your country and choose what best describes your organization from the dropdown menu.

Once you’ve selected this information, click the checkbox for Terms of Service and then click the ‘Continue’ button.

Enter personal details for billing account

On the next screen, you’ll need to enter your phone number for verification.

Once you’ve done that, click the ‘Send Code’ button.

Enter mobile number

After verifying the code, the next thing to do is enter your business name, payment method details, and billing address.

Once you’ve entered these details, click the ‘Start my Free Trial’ button.

Enter business name and payment details

Next, you’ll be asked a series of 4 questions about your organization and how you’ll use the Google Maps Platform.

Google Maps will ask about your primary goal for using the platform, which industry you’re in, select a use case, and your company size.

After answering these questions, go ahead and click the ‘Submit’ button.

Answer few questions for google maps

You’ll now see a popup with your Google Maps API key.

You can copy and save this key in a text file for future use.

Copy the API key

Now that you’ve created a Google Maps API key, you’ll need to head back to your WordPress dashboard to enter it in AIOSEO Local SEO settings.

Configuring Google Maps Settings in WordPress

You can now go back to All in One SEO » Local SEO from your WordPress dashboard and then navigate to the ‘Maps’ tab.

Go ahead and enter the Google Maps API Key in the ‘API Key’ field. You’ll see a preview of the map in AIOSEO as soon as you add the key.

Add API key and see map preview

Next, you can scroll down to edit the map settings.

AIOSEO lets you display Google Maps using a Gutenberg block, shortcode, widget, or PHP code. It also lets you choose different map styles and add a custom marker to your map.

Edit map settings

Don’t forget to click the ‘Save Changes’ button when you are done.

Displaying Google Maps in WordPress

Next, you can add Google Maps to any WordPress post or page. To start, simply edit or add a new page on your website.

Once you are in the block editor, click the ‘+’ button at the top and add the AIOSEO Local – Map block anywhere on the page.

Add local maps block

After that, your Google Map will be added to the page.

AIOSEO also lets you edit the map settings from the options on your right. For instance, you can show labels and icons, add a custom marker, and edit the map’s width and height.

Edit your map in WordPress

If you have multiple locations, then you can select which location to highlight by choosing from the options given in the menu on your right.

Simply click on the ‘Location’ dropdown menu and select your preferred location to display on your website.

Choose which location to display

Once you are happy with your settings, go ahead and publish the page.

Now you can visit your website to see Google Maps in action.

Preview your map

You can also add Google Maps to your site’s widget section, like the sidebar or footer.

To start, head over to Appearance » Widgets from your WordPress admin panel. Next, click the ‘+’ button and add the ‘AIOSEO Local – Map’ widget block where you’d like to display your location.

Add maps widget

After that, you can edit the widget settings.

For example, you could add a title, change the width and height of the map, choose which location to display if you have multiple locations, and edit the label.

Edit map widget settings

That’s it!

Now when you update your website, you’ll see Google Maps in your widgets area.

Maps preview in widget area

Expert Guides on Using Maps in WordPress

Now that you know how to add Google Maps to your site, you may like to see some other guides related to maps and location in WordPress.

We hope this article helped you learn how to add Google Maps to your WordPress site. You may also want to see our picks for the best WordPress plugins for small businesses and learn how to add a Google Maps store locator in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

35 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Moinuddin Waheed says

    This is really a time and resource saving post for me as I was looking a minimal way of adding a Google map address in one of my clients website and was not sure how to do.
    Both the methods without plugin and with AIOSEO are good and serves my need.
    But I would go with AIOSEO to implement this feature as it will also help in local seo.
    Thanks for this helpful guide for embedding Google map.

  3. melanie bund says

    Hi, do you know how to hide the 13px white space at the bottom of the embedded google map?
    Thank you in advance
    Melanie

  4. Donata says

    I have a google maps on my web, but the pin which is added to the map is not clickable. The pin only shows the adress but it do not direct if you click on it. Is it possible to do clickable icon?

  5. Sharon says

    Don’t you have to get an API from Google before you can use a map plugin and insert it into the plugin? That’s been my experience lately.

    • Mark says

      Hi I’m trying to insert a google map onto my website ( WordPress ) it keeps disappearing am I correct in thinking that google now want $200 a month for this or whatever the cost or can I still insert a map for free

      • WPBeginner Support says

        Google now charges for large uses of their maps API which is what the plugin runs on, the $200 you likely saw was the free monthly credit Google gives to those using their API so smaller sites are not charged.

        Admin

        • Kamil says

          Yes, that true but there is alternative for Google maps API. OSMapper is the plugin that uses Open Street Maps API that does not requires any API keys and there is no limit for usage. You can install it from WordPress.org.

        • WPBeginner Support says

          While we have not tested it yet, we will be sure to take a look at it.

  6. Blessy says

    I tried the first step: copy the HTML in the after going to the embed button and paste it into the text version of the post. I went to the visual one and saw the embedded google map. I saved it at the site takes out the map. The changed texts remain, though, but the map keeps vanishing. it keeps repeating each try. Why does it happen?

  7. Sara C says

    Great tutorial – short and to the point. I had tried two other plugins that my client didn’t like. Thank you for the manual embedding information. Worked perfectly and quickly.

    Many, many thanks for this tutorial.
    Sara

  8. Denny Png says

    Dear Sir/Madam,

    I would like to change the Google Map address & not sure where to locate this embedded link to update the WP backend. I couldn’t find it the contact menu to locate it.

    Seek yr kind advise on it!

    Thankyou!

    Rdgs,
    Denny Png

  9. Kathy says

    Thank you! This is what I was looking for! Perfect for my travel post on my blog! The video is great and very helpful!

  10. Andy Kramer says

    I would love to do this but when I go into google maps and type the address there is absolutely no gear so I can’t even get a link to copy for WordPress. Any ideas or suggestions?

  11. Mari says

    Hi!
    I can’t find the code.. There’s no “flower icon” nor other links on the bottom right of the map. Is it because the place I’m trying to add doesn’t have a street address, it’s just coordinates?
    Thanks in advance.

  12. Karthik says

    Is there any way to get this Map as a background to a page with full length say width 100% n height 100% something like that??

  13. Carla Spacher says

    Thanks so much! Why would anyone bother with a plugin that may ultimately slow down their site when you have provided such easy instructions to grab the code from Google Maps?

    By the way, if anyone is having trouble finding the code. Once you see the map, go to the bottom right-hand corner and click on the flower icon and click on “Share and embed map”. Then click on “Embed map” and enter into your WP page/or post.

  14. Rory says

    Hi, I was wondering if it is possible to have Google Maps to show the location of Groups (Buddypress)?
    Thanks for your help.

  15. aamir says

    hello sir,

    i want to use plugin which provide exact location. can you suggest me? i use map press, leaflet market, wp google map etc. plugin but still no luck. all this plugin show some far location from my exact location. i want exact location where my shop is located. please help me. or is there any way to develop custom map & put in wordpress site? please provide step by step procedure.

    Thanks & Regards,
    aamir

  16. Trang Tran says

    Thanks for taking the time to write this article. It’s very helpful. Is it possible to add a Google Map that is linked with Google Places?

  17. Guilherme says

    Very nice. But when we use coordinates, the lightbox map don´t work right. It just shows some place in USA. How can I fix this?

    Thanks

  18. Christopher Rose says

    Thanks for all the informative WP articles you’re posting.

    Is it possible to add a Google Map to a site that

    1. automatically adds the location of all site visitors or commenters to a map
    and
    2. allow all customers to be added, probably manually, although an automatic option would be good too. I have a small ecommerce site that has customers all over the world and thought it would be fun to show where we have sent stuff to.

    • zakaria says

      Thank you very much!

      I have already founded (MapPress Easy Google Maps) and it is nice plugin.
      And of course, your attention is very nice support. THANKS!!!
      One more thing, please.
      I would like to use these maps in tabs but only tab’s (shortcode) plugin I have found so far which shows maps is (Jshortcode). (I mean it shows in second or third tab. The others aren’t showing in second or third tabs.) It is nice plugin too but has very colorful tabs.
      May be you would be so kind to advice some other plugins to solve this problem.

      Thanks advance
      Best regards
      Zakaria

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.