[ad_1]
[ad_2]
The issues can be related to plugins, themes, or just WordPress in general. How did you troubleshoot and resolve the problem afterward?
Copyright © 2020 - 2022, Project DMC - WordPress Tutorials for Beginners- All Rights Reserved. Privacy Policy
Think the toughest issue to debug are plugins that hit a 3rd party url and timeout, causing a nasty delay in the page loading. Answer is profiling, but early on I put a wrapper on all php functions that called out and spit them out in debugger. Kind of amazing to see all the junk plugins call.
The most memorable one was when a simple file require was resulting in strange and completely unrelated output. One of those sanity-wobbling this-can’t-be-happening bugs, because it’s not even a code that has any logic or whatever to fail.
In a bit I stripped file to nothing and was still getting output, so it finally clicked that I am getting the wrong file, even if I don’t understand why or how.
It was down to how PHP processes includes – it will check include path, then calling script directory (!!!), then working directory. And calling script directory happened to be WordPress core and happened to have a core file with that exact name.
Always use absolute paths for includes, folks.