Troubleshooting and FAQ

An ad does not appear

Go through the list in this order. Most problems are found in the first three steps.

  1. Cache. Clear every cache (plugin, server, CDN) and reload in a private window. See Page caching.
  2. Display in. Is the switch for this page type on? Remember that category and tag pages are archives. See Display rules.
  3. Targeting. Clear the Targeting and Schedule fields of the campaign and look again. If the ad appears, add the rules back one by one. Check what the plugin sees for you in Your connection on the Settings page.
  4. Position. A paragraph, heading or image position needs enough elements in the post. A content position needs a theme that prints text through the_content, and some page builders do not. Try After content or a shortcode to compare.
  5. Limits. If the behavior is not “Always display”, another campaign may have used the free slot because it comes earlier in the list.
  6. Ad network. The plugin inserts the code. If the HTML of the page contains your code but nothing shows, the problem is on the ad network side: the account, the site approval or an ad blocker.

Messages of the plugin

MessageWhat it means and what to do
The GeoIP database is not available yet. It will be downloaded automatically.No database file was found. The plugin downloads it when an administrator opens the admin area. Wait a minute and reload, or press Update now on the Settings page.
GeoIP database update failed: …The reason follows the colon. See the next rows.
the PHP zlib extension is not available.Ask your host to enable the zlib PHP extension.
another update is already running.A download started less than ten minutes ago. Wait and try again.
cannot create the folder …The uploads folder is not writable. Fix the permissions of wp-content/uploads.
cannot unpack the downloaded file.The download was incomplete or the disk is full. Try again.
the downloaded file is not a valid GeoIP database (…)The download source returned something else, for example an error page from a proxy. The old database stays in use. Try again later.
cannot install the new database file.The new file could not replace the old one. Check the permissions of wp-content/uploads/wpai-geoip/.
PHP error: … Please check the ad code in the WP Ad Inserter campaign ID NThe PHP in that campaign’s ad has an error. Only administrators see this text. Fix the code or switch off Execute PHP.
The city-level GeoIP database is off, so this rule is not applied.Shown on the City names, Weekdays and Showtime ranges rules. Switch on City-level GeoIP database on the Settings page.
You are not allowed to edit the raw ad code, so the code fields have been left unchanged.On a multisite network only super admins and users who can post unfiltered HTML can change ad code.
Something went wrong. The settings have not been saved.The campaign you were editing no longer exists, for example it was deleted in another tab. Reload the list.

FAQ

Does the plugin insert ads in RSS feeds?
No. Feeds and REST API responses are left untouched.
Can one campaign have several positions?
No, a campaign has one position. Create another campaign with the same code for another position.
Where did the Pro features go?
All of them are in the free plugin. City names, weekdays and showtime ranges need the city-level GeoIP database, which you switch on on the Settings page.
Will an update remove my campaigns?
No. Campaigns are kept in the database and survive updates. Before version 1.2 changed one field name, a copy of your data was saved in the option wpai_campaigns_backup_v1.
How do I move campaigns to another site?
Copy the option wpai_campaigns with a database tool or a WP-CLI command (wp option get wpai_campaigns --format=json and wp option update wpai_campaigns --format=json).