WP Web Workshop

Troubleshooting Featured Image

Ads.txt Automatically Gets Deleted

Here’s an interesting one! I was asked to help with a problem with a WordPress site where the person was trying to create an ads.txt file in the web root directory and it would automatically delete after about a second.

In troubleshooting this, I recreated the issue. I created an ads.txt file from FTP and via SSH. At first I thought it was a file permissions issue, but I was able to create a test.txt file in the same directory without issue.

Since ads.txt was the only filename getting removed automatically, it had to be some type of service or plugin.

Sure enough there was a WordPress plugin enabled on the website called Mediavine. This plugin helps manage ads, and controls the ads.txt. I couldn’t believe it completely would delete the file though.

Once Mediavine was deactivated, we were able to successfully create an ads.txt without it automatically disappearing.

So if you have this problem, check for any services, plugins, or anything enabled on your server that is supposed to manage the ads.txt.

You learn something new with WordPress every day.


Updated

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *