How to enable debug mode in ShopMagic
Whenever you stumble upon some ShopMagic errors in your automations or marketing lists, it's good to start with debug mode, to collect information about the occurring problem.
You can enable ShopMagic debug mode in ShopMagic -> Settings -> Enable logging.
Finding debug logs
Depending on your WordPress configuration, log with ShopMagic debug data may be found in different locations on your server.
You can find the PHP error logs in a few possible places on the server:
- in your server’s root folder, called error.log
- in public_html or similar folder, called error.log
- in var/logs or similar, called error.log
- additionally, if you have debugging enabled in WordPress and you have it saved to a file, it will be in the wp-content folder and called debug.log
If you’re having trouble finding the file, you can have PHP show you where it is:
- Create a file named phpinfo.php in the root of your WordPress directory
- Open the phpinfo.php file in a text editor
- Insert the following code into the file: <?php phpinfo(); ?>
- Open the file on your site. For example, if your site’s URL is example.com, you can open the file by visiting http://example.com/phpinfo.php
- Search the page for the
error_log
value. The file path listed here is the absolute file path of the PHP error log – visit that address on your server and you should find the PHP error log. If the value is empty, then you need to set a value to log errors on your site. See the picture below for how it should look like:
Remember to delete the phpinfo.php
file immediately after you have checked the error_log
value. Otherwise, it may be a security threat to your site!