How to Add Google AdSense to a WordPress Website [a step by step guide]

How to Add Google AdSense to a WordPress Website [a step by step guide]

Displaying ads is one of the easiest ways to monetize your WordPress website. Numerous platforms allow you to get connected to the advertisers and sell your ad spaces to them. Google AdSense is one of the most popular and widely used ad networks. It serves different types of ads based on the image and tone of your brand. In this article, we will show you how to integrate Google AdSense into your WordPress website easily.

There are two ways of WordPress AdSense integration; manually or via plugins.

We will show you both the ways, step by step.

This article will help you add Google AdSense to your WordPress website easily in just a few quick steps.

Why Google AdSense?

Google AdSense is a popular advertising network by Google.

It is a user-friendly platform that connects advertisers to website owners. It serves ads relevant to your website content, target groups, and the browsing history of your visitors.

You can easily make money with Google AdSense by displaying ads on your site. It ensures better click-through rates, and signing up is free.

How Does Google AdSense Work?

AdSense works on the Pay Per Click (PPC) model in which Google charges the advertisers to show their ads on the Google AdSense network’s partner websites.

On the other hand, it pays the ad publishers to reflect ads on their websites. It is the largest online ad network that helps both advertisers and publishers to earn decent revenue from these trades.

With AdSense, you don’t have to directly interact with the advertisers in any way, which saves a lot of time and lets you focus more on growing revenue through ads.

Let’s take an example to see how it works.

Let’s say you have a shoe store and want to advertise your business and products via display ads, so you go to Google Ads (earlier Google AdWords) and set up the display ads campaign. Now, Google Ads will charge you based on the PPC model.

On the other side, the Google AdSense ads network will display your ads on the partner network websites (publishers) that have content related to shoes and similar products and to the users who are looking to buy or have bought such products.

Here, Google will pay the publishers for letting them show the ads on their website.

Creating a Google AdSense Account

Before you start to display Google AdSense ads on your WordPress site, the first step is to create a Google AdSense account. It takes just a few clicks to get it done.

If you have an existing Gmail/Google account, you can go ahead with it.

Here are the steps:

google adsense signup
  • Go to the Google AdSense site
  • On the homepage, click on the ‘Get Started’ button leading to the Sign-Up page
  • Add your website URL and email in the Sign-Up form and choose your communication preference
  • Click on the ‘Save and Continue’ button
  • On the next page, add your contact details and submit your application
  • Read the terms and conditions and agree by clicking on the checkboxes
  • Now, Google AdSense will ask you to verify your phone number through a text message or voice call
  • Once the verification is complete, you will receive a code
  • Copy the code and keep it safe, as you will need it to link Google AdSense to your account

After applying, it takes up to 7 days for the Google AdSense team to review and approve/disapprove your application.

Once your application is approved, you can log in to your account.

You will get a personalized code that you’ll need to add to your website to let AdSense display ads on your website.

Manually Adding AdSense Code in Your WordPress Website

The next step in showing AdSense ads is to add that verification code to your website. Here’s how to do it.

Manually add Google AdSense code to WordPress

The steps are as follows:

  • Head on to your WordPress dashboard
  • Go to Appearance -> Editor
  • Go to the dropdown menu called ‘Select theme to edit’ and select the existing theme
  • Now, select the theme header template from the list on the right
  • Look for the tag and then paste the verification code right after it
  • Hit the save button to save the changes

Creating an Ad Unit in Google AdSense

Creating ad units by adding Google AdSense ad code to your website may seem a bit difficult, but once you know the process, you can do it easily in a matter of a few minutes.

Here are the steps you need to follow.

Earn with Google AdSense Ads
Earn with Google AdSense Ads
  • Log in to your Google AdSense account
  • Click on the ‘Ads’ menu in the left sidebar and then sort it by the ‘Ad’ unit in the overview section
  • Click on the ‘Create new ad unit’ button
  • Now you will have to choose the ad type
  • Google AdSense supports three major ad types – Display, Infeed, and In article. Based on your requirements, select your ad type
  • Now you have to give a name to the ad unit and select the ad size. As the name is for internal use only, you can assign any name you want. There will be a list of the popular ad sizes. Choose the one that matches the needs of your website
  • The next step is to decide whether you want responsive or fixed ads. It is better to go for a responsive option as they support all devices and screen sizes
  • Finally, click on the ‘Create’ button to proceed
  • Google AdSense will generate an ad code for you. The code will carry a unique ad unit Id and your publisher Id
  • Copy the code and paste it into a plain text editor like your notepad for further use

Adding Google AdSense Auto-Ads Code in WordPress

For a general user, placing ads one by one in different areas of the WordPress website can be intimidating and time-consuming.

It allows you to add just one code snippet to your website and let Google AdSense display ads on your site automatically.

However, in this method, Google AdSense decides the best areas for ad placement, the ad types to display, and the ad sizes, and you do not have manual control over these aspects.

Here are the steps to add AdSense auto-ads code in WordPress:

Adding Google AdSense Auto-Ads Code in WordPress
  • Login to your Google AdSense account
  • Click on the ‘Ads menu in the left sidebar
  • Now, in the Overview screen, click on the ‘Get Code’ button to generate the auto-ads code
  • AdSense will show a code snippet with your publisher ID, copy this code
  • Now, go to the header.php file in your WordPress theme editor and paste the copied code just after the <head> tag

It is important to note that this method is not the best as you will lose the ad code if you update or change your theme anytime.

A better alternative is to use a Header & Footer plugin to place the ad code. It will not vanish even if you change your website’s theme.

Manually Inserting Google AdSense Ad Unit in Your WordPress Website

Now, it is time to insert the ad unit into your WordPress website. Follow the steps below to get it done:

  • Go to your WordPress dashboard
  • Navigate to Appearance -> Widgets
  • Select the ‘Text’ widget from the list of the available widgets
  • Drag and drop it into the area where you want to showcase your ads
  • Navigate to the text tab in the text widget area and paste the personalized code that you generated in your Google AdSense account
  • Click on the ‘Save’ button to save the changes
  • You are done!

The process might seem overwhelming to many. To simplify this, you can always use a WordPress Advertising plugin that helps you get complete control over WordPress AdSense implementation.

However, manually inserting ads in WordPress has some advantages over auto ads.

  • You get to choose the types of ad units to show
  • Select the pages or contents where you want to show your ads
  • You have control over the number of ads shown on a page

So, Auto ads is a good option when you want an easy and quick implementation of ads, but manual ads let you have more complete control over your ad display efforts.

Integrate Google Adsense with WordPress Using WP AdCenter Plugin

Displaying ads on your WordPress website from Google AdSense using the manual method can be tricky and time-consuming. Also, it involves a bit of configuration that would require some technical know-how.

A plugin like WP AdCenter can help you do it all easily within a few minutes, and it doesn’t need you to get your hands dirty with any technical configuration.

WP AdCenter is a powerful yet easy-to-use ads management plugin for WordPress that displays ads of all types. It is an all-in-one plugin packed with all the features you need to monetize your WordPress website with ease.

Here are the steps to integrate Google AdSense with your WordPress website:

  • Head on to your WordPress dashboard
  • Navigate to the WP AdCenter menu
  • Now click on the ‘Settings’ option
  • On the Settings screen, click on the ‘Integrations’ tab
  • Now, click on the ‘Connect to AdSense’ button
  • In the sign-in screen, choose your Google account associated with AdSense and then click on ‘Allow’
  • Once you get connected, you will see a token. Copy this token
  • Go back to the integrations tab and paste the token in the respective field
  • Now click on the ‘Submit Token’ button
  • After submitting the token, click the ‘Save Changes’ button on the bottom right.
  • All done!

Now your Google AdSense account is connected to your WordPress website.

Add Google AdSense Ads to WordPress Site Using WP AdCenter

The next step is to see how to create Google AdSense ads using this plugin. It’s as easy as a pie, let us show you.

  • Head on to your WordPress dashboard
  • Navigate to the WP AdCenter menu
  • Now click on the ‘Create Ad’ option
  • In the ‘Create New Ad’ screen, add a title for your ad
  • In the ‘Ad Type’ dropdown, choose ‘Import from AdSense
  • Click on the ‘Load’ button for the ad you want to load from the list of ads from your Google AdSense account
  • On the right sidebar, you can see the ‘Publish’ settings. Here you can set the start and expiration date for your ads
  • Click on the ‘Publish’ button to publish your ad

And that’s how easy it is to create Google Adsense ads with WP AdCenter.


Google AdSense is probably the best option when it comes to monetizing your website.

However, it is also important to know that it isn’t super easy to integrate Google AdSense with a WordPress website. It can get a bit difficult and frustrating for some people. So, choose the method that works best for you.

The WP AdCenter plugin can be a great option for you. It is an all-in-one toolkit for WordPress ads management with all the features you need to monetize your content effectively. Get it here.

It will help you connect Google AdSense to your WordPress site within minutes and pull ads from there without any trouble.

If you liked this article, don’t forget to share it. Leave your thoughts or questions in the comments section below. Your feedback is highly valuable to us.