In most cases it doesn’t take me long to identify the cause of an issue that you report to me. However, there is still a chance that bugs occur because of a conflict with another plugin or a server setting or even a missing file that got lost while installing the plugin.

These kind of problems don’t throw an error message on many setups by default. So in order to identify the problem, you can try to switch on the debug mode that is included in WordPress. This will log or display errors that occur in PHP, the main language WordPress and Advanced Ads are written in.

You can find the official and detailed documentation about WP_DEBUG and Co in the WordPress codex. This post however contains instructions and step by step guides for Advanced Ads in particular.

How do you enable debug mode in WP?

If you want to check for PHP errors yourself or I asked you to send me the list of PHP errors, you can follow these steps.

1. Open wp-config.php

Log in to your FTP account and search for the wp-config.php  file in the main directory of your WordPress installation.

Download the file and open it on your computer or edit it online (depending on your FTP editor).

2. Check for WP_DEBUG

Go down to the line where WP_DEBUG is defined. This normally looks like this:

If the line is missing, search for the comment that says /* That’s all, stop editing! Happy blogging. */.

We are going to operate above that line.

3. Insert WP_DEBUG codes

You have basically two options now. Either display all errors to the frontend or log them in a file so that no one sees them while visiting the page.

This is the code that you should include in your wp-config.php  file to display all errors:

It is obvious that you shouldn’t display the errors on a website that is already publically available and visited by real users.

In order to log the errors, use this block instead.

Please save the file now. If you downloaded it before, upload it again to replace the existing version.

4. Provoke the error

Now go to the page where the problem happens. This can be the frontend page or a page in the admin. If you performed a specific action, e.g. sending a form, then also do it now.

If you opted for the frontend output and want to let me know about an error message then please make a screenshot now.

5. Disable WP_DEBUG

Now go back to your wp-config.php file and disable WP_DEBUG. You can also decide to keep it on if you are working on a development environment or keep the logging for a while to catch bugs with other plugins or themes that you might not be aware of.

However, if you want to disable error output again, change WP_DEBUG to false, like in the line below.

And remove this line, if you included it before.

Please save the file again.

6. Download debug.log

Go back to your FTP account and search for the wp-content  folder in the base folder of your WordPress installation.

There should be a file called debug.log. If there isn’t, there could be two reasons:

  1. there was simply no error
  2. you don’t have the permission to create new files. In this case, create an empty file called debug.log and upload it. Set the file permissions to 777.

If the file was created then download it.

7. Check for errors

Open debug.log  now and check for errors. If I asked you to check this file then you can also send it to me right away.

Please be aware that the file contains all PHP errors, so even if there is plenty of stuff in it then it must still not be related to Advanced Ads.

However, it is definitely an error related to Advanced Ads if one of the paths mentioned in the error messages contains the string advanced-ads.