Debugging WordPress With error_log()

If Debug logging is enabled, simply use the error_log() function and it will be written to /wp-content/debug.log . Refer this article to see how it can be done:

Enable Debug Logging In WordPress

You can also write the error_log to a file. WP_DEBUG need not be set to true.

error_log("\n[Timestamp - " . time() . "] " . print_r($settings,true), 3, ABSPATH . "/my_error_log.log");

Using var_dump() instead of error_log(): Writing to the PHP error_log with var_dump & print_r

Hello, I am Arun Basil Lal. Thank you for reading!

I am a WordPress product developer and creator of Image Attributes Pro. I am passionate about solving problems and travelling the world.

Divi WordPress Theme - My Review

Divi WordPress Theme
Divi is a WordPress theme that web designers do not want you to know. It comes with a drag-and-drop theme builder. You can build beautiful looking unique websites without touching a line of code. Just choose from one of the many pre-made layouts, or pick elements and arrange them any way you like.

Divi is every WordPress developer's wet dream. Surprise your clients with neat responsive websites and have fun building them.

Divi comes from Elegant Themes. If you enjoy building websites, you *need* an Elegant Themes membership. 87 beautiful themes and 5 plugins for the cost of less than a candy-bar each!


Note: I am an avid user of Divi myself and this is a honest review. I wouldn't recommend something that I do not personally find amazing.

Leave a Reply

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

*