Debugging in WordPress

Debugging in wordpress can be a bit difficult when your first starting out, while I don’t use breakpoints such as what Visual Studio offers, I can offer advice on how to debug php in general, as well as turning on the debugging output from wordpress. First start by opening up your wp-config.php and finding the … Read more

Suppress deprecated notices

As mmm stated: in which file appears the first notice? Wherever the notice is mentioning the location of this deprecated function (path/to/some/file.php), you would insert the following just below the <?php tag which starts off the file: error_reporting(0); I’ve tried the above functions you mentioned and inserted them in my wp-config.php when I experience something … Read more

Count & Display Database Queries

You can paste this block of code in your currently active WordPress theme functions.php file: function wpse_footer_db_queries(){ echo ‘<!– ‘.get_num_queries().’ queries in ‘.timer_stop(0).’ seconds. –>’.PHP_EOL; } add_action(‘wp_footer’, ‘wpse_footer_db_queries’); The above block of code, will render an HTML comment in the footer of your theme (before </body> and </html>, containing the number of database queries and … Read more

How can I debug the TTFB in WP?

Meanwhile, I found some plugins and tools that can help with this: Query Monitor Laps Debug Bar with some add-ons(Slow Actions, Rewrite Rules, etc.) If you really wanna go deep, try using Webgrind. Not the most friendly tool, but it’ll do the job. Be aware that some of this tools will also have an impact … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)