Home Guides and Tutorials How to Monetize WordPress Websites

How to Monetize WordPress Websites

by Olly V
How to monetize WordPress website for free

How To Monetize Your WordPress Website |
A Guide to Working With Adsterra Ads

WordPress has owned a 63% share of the content management systems (CMS) market by now. Needless to say, that the platform is continually evolving. Over 38% of websites are built on WP. With tons of plugins, widgets, and content builders inside, it has become one of the most preferred platforms for running an online business. Tens of thousands of webmasters and bloggers still choose WordPress as the prime platform to monetize their websites.

For Adsterra partner publishers, WP has also become one of the top-5 blogging platforms. Growing business online, they are naturally willing to monetize their WordPress websites. So today, we’re going to outline the ways of adding Adsterra’s ad codes to your web pages so that you could make money with your WordPress-based site for free.

In this guide, we’ll go through the steps of adding Adsterra Popunder, Social Bar, Web Push, Native, and Display Banners’ ad codes.

Before you start WordPress monetization: Tech aspects to consider

As we mentioned before, WP is the friendliest CMS as it offers loads of instruments that facilitate your routine: text formatting, adding images and videos, adding tracking systems, and email subscription forms. On the other hand, this provokes confusion when you need to get a clear flow of HOW TO add an ad code to your page. Your themes vary, your access rights vary, the interface might look slightly different; you might use several plugins for adding HTML and JS codes. For this guide, we have chosen the most common user flow.

STEP#1. Getting Adsterra ad codes from your Publisher’s account

Before placing a code, you need to generate it on Adsterra platform. It’ll take less than 5 minutes. 

 1. First, you need to log in (or sign up) as a Publisher on adsterra.com. 

2.  After you’re in, on the left you’ll see the control panel with all your tools and services. Choose the Websites tab. Click the green button Add new website

Add website to Adsterra

3. In the Add new website window, please fill out the fields:

  • Add your website URL.
  • Choose your website category from the list (if nothing suits you, choose Other).
  • Select one Ad Unit (each time you can add just one code for one unit: Popunder, Social Bar, Web Push, Banners, etc.). Let’s choose Popunder or Social Bar this time as we’ll need it for the next step.
  • You can also put filters to remove ads that you don’t want to run (like those with sound).
  • Click the Add green button.
Get Adsterra ad code for a website

4. After you added a website, you’ll see a notification that your website is waiting for approval (Pending status). Approved sites are green. Wait until Pending status changes to Approved.

5. Ok. You see the green Approved status. Click All codes – Get Code. Here you see a piece of code (on the right) and a short instruction where to put it (on the left).
💡 Copy the code and keep t as we’ll need it later.

STEP #2. How to add Adsterra Popunder or Social Bar code to your WordPress website

After you successfully generated your Popunder or Social Bar code, let’s see how and where you can place it on your WordPress website to monetize from ads. Please read through this part carefully because most of the actions will repeat later when we will be observing other formats. We’ll go step by step to make each action clearer.

In general, there are two typical cases: 1. when you have access to your WP theme’s editing and 2. when you don’t. We will cover both of them.

CASE 1. Using the WordPress Theme Editor to place an ad code

  1. Log in to your WordPress admin panel. Usually, it looks like this: https://[yoursite.com]/wp-admin.
  2. Find the Appearance section (generally, it’s on the left) and click on it. Choose Editor or Theme Editor.
  3.  Find the theme’s header.php file.
  4. Copy your Adsterra code (see STEP#1).
  5. For Popunder: paste the code before the closing “</head>” tag. For Social Bar: paste the code before the closing “</body>” tag.
  6. Click on ‘Update file’ or ‘Save’ . That depends on your WordPress version.

CASE 2. Using the WordPress Widgets section to put an ad code

Choose this way when you can’t change your WP theme.

  1. Just like in the first case, log in to your WordPress admin panel.
  2. Find the Appearance section and choose the Widgets tab.
  3. Select Custom HTML from the list.

See how it works on the screenshot below.

Place ad codes in WP widgets

4. Check the theme element and click Add Widget; the widget will open in the element section. Paste Adsterra Popunder or Social Bar code in the Content field. Make sure you have copied the whole piece of code. Otherwise, it won’t work.

5. After you paste the code in the widget, click Save. You’re ready to monetize your WordPress website with Popunder or Social Bar ads!

Note that if you use more than one Popunder code on the same page, they may conflict with each other and lower your CPM.

How to install Adsterra Web Push code on your web page

Good news! For most of the Adsterra’s ad formats, you only need to repeat the steps outlined before. First, you log in to Adsterra, choose the ad unit (in this case, it’ll be Web Push), and then generate a code to place on your website. However, there are some tricks with Web Push that we want to clarify here.

When you click Get code for a Web Push ad unit, you’ll see the code itself and a big green Download button. Click it to get our Service Worker file for this Web Push ad unit (for another website, you’ll have to download a new file).

Add Web Push code to your website

What to do with this service-worker.js file? You’ll need to place it on the root directory of your WordPress website. How to find it? Connect to your website via FTP or a File Manager. Your root directory will always contain configuration files like .htaccess or .wp-config files. Put our service-worker.js file to the same place near one of those files. When done correctly, you can start making money with your WordPress website almost instantly.

where to put your service worker file

How to place Adsterra Display or Native Banners’ codes on the website

On the Adsterra platform, take exactly the same steps you did for getting Popunders and Social Bar ad codes. You can also choose the dimensions of a display banner to match your website design and structure: 468×60, 300×250, 320×50, 160×300, 160×600, and 728×90 pixels.

On WordPress, place the codes exactly where you want the banners to appear on your page. Anywhere in the page body (but not between the “” tags)  

You can place the ad codes with Custom HTML widgets as we did earlier. There are 2 ways to edit custom widgets.

Way 1. Choose Appearance, then pick the Widgets tab, choose the element from the list and click Add Widget. Place the code in the Content field and click Save.

Place ad codes in WP widgets

Way 2. Choose Appearance – Customize – Widgets. And also, select the Custom HTML widget. Paste the code. This way is better when you can edit your WP theme.

Paste Adsterra ad code to wordpress

We strongly recommend you to use one banner of each size per page for better performance. If you need extra ad units of the same size, please contact our managers.

Tips on how to work with ad codes and monetize your WordPress website wisely

Now that we have gone over the steps that a WordPress website owner needs to take to monetize their website, let’s highlight some helpful tips.


We have examined the sequence of actions you’ll need to make to monetize your WordPress website or blog with Adsterra ads for free. You can either choose classic formats like popunders or try a super-engaging Social Bar. By now, Social Bar has been on the peak of interest. It is easy to install and impressive in performance – even our first testers got up to $300 weekly profit on Tier 1. How to make more money with Social Bar? Find the answers in this guide.

If you’re looking for specific formats to monetize a WordPress blog, take a look at native banners, as they are friendly to long-read articles and are not blocked by adblockers.

That’s it. Now you are ready to make money with your WordPress website!

Related Posts