Recently, we were trying to changing the position of the
Google Ads that are shown on a website using the Google AdSense plugin for WordPress.
After clicking on the
Manage Ads button at the configuration page (http://example.com/wp-admin/options-general.php?page=GooglePublisherPlugin) we would get an error that another theme had set the active ads and that the plugin cannot proceed to modify them unless they are disabled from the other theme (Specifically we would get the following error:
Due to a theme change, ads are not being shown. Please reconfigure your ads or restore the previous theme.).
(a) Disabling the plugin, (b) Uninstalling the plugin (c) Reconnecting with another AdSense account did not help at all.
What we did at the end was to remove the
GooglePublisherPlugin entry from the wp_option database of our installation.
DELETE FROM `MyDatabase`.`wp_options` WHERE `option_name` = "GooglePublisherPlugin";
Next time we visited the configuration page, we were disconnected from the previous account and we had to reconnect.
After reconnecting, we followed the configuration procedure, we pressed the
Manage Ads button, the website was analyzed, we got the confirmation message and we clicked on the
Save & Activate button to store the changes.
For a few hours, no ads were shown on the site. We did not take any action and on the next day that ads started appearing as expected.
This post is also available in: Greek
Hi thanks for this,
What about the option_value in wp_options that has the GooglePublisherPlugin value?? Do you remove that as well?
Essentially, yes. We remove the value as well.
This is exactly what this code does
DELETE FROM `MyDatabase`.`wp_options` WHERE `option_name` = "GooglePublisherPlugin";.
It will delete the entry (along with the value of that entry) from the database.
We saw no benefit in making a backup of it, as that value was causing us trouble.
In case you want to save it somewhere, issue the following command that will get you the value of the entry in plain text
SELECT * FROM `MyDatabase`.`wp_options` WHERE `option_name` = "GooglePublisherPlugin";.
Thank you very much. It worked for me