Local Community

WP_DEBUG_LOG stopped working

@afragen thanks for your suggestion. That’s funny, I just installed Query Monitor yesterday to investigate some page loading slowness. Everything looks right to me in the Environment summary. I’ll attach screenshot.

@clayteller it all looks correct. I wonder if it’s a permissions issue for the wp-content folder.

@afragen yeah worth a look… I view permissions of wp-content directory in terminal and it is the same permissions as the wp-content directory in my other site which doesn’t have any issues. Screenshot from my terminal window:

Does the debug.log file exist and what are its permissions?

Hey @clayteller

Along the lines of @clay 's question about Environment type and version – What if you export this site, and then import it as a new site?

Does the imported site do this logging correctly?

– Ben

@afragen in my past experience debug.log will be created by WordPress when it does not exist. I’ve tried both scenarios: without the file and with debug.log file with “777” permissions, and neither one worked for me

@ben.turner I just did the following with no luck: 1) clone the site in question 2) load the new cloned site, which was automatically updated to the latest environment 1.3.1 in the course of cloning 3) load pages on the cloned site to see if errors will be logged to debug.log and they were not

Very odd. Not sure I have any other ideas. Your sure there are errors and you’re simply not writing perfect code? :wink:

1 Like

Something about this feels like a file/folder mounts type of thing. I know it sounds odd, but have you restarted the computer since the update?

Also, is there any information in the Local log, or one of the files in the logs folder for the site?

– Ben

@afragen thanks anyways. If only :grin:

@ben.turner I tried restarting but the issue remains. So, I decided to update the environment for my site (whereas earlier I cloned and updated the clone). Also, there was a new version of Local available, so I updated to the latest version of Local as well. I was hopeful that the updated environment and updated Local software would lead to a fix. Not only did it not resolve the debug file issue, now my pages are taking around 3 times longer to load. I just don’t get it…really frustrating. Honestly, this is why I was reluctant to update in the first place. I do appreciate the help, it just sucks I’m worse off now. I guess I’ll try to change back to the previous environment now. Not really sure where to go from here.

@ben.turner I’m not sure where to check for the Local log, but am interested to find it and take a look. Can you tell me where to look for that? Only errror log I see in logs folder is in nginx folder.error.log (6.3 KB)

Ok, now pages are loading like they were before. Haven’t changed anything since my last report, so not sure why they were taking so long to load a while ago. Anyways, hopefully the triple page load time is a non-issue now.

See “How do I retrieve Local’s log file?” for where to look.

Basically, on a Mac it’s located at ~/Library/Logs/local-by-flywheel.log

One thing while looking at that NGINX error.log log – I see a few references to urls that might not be correct, for example:

  • https://ere.ere.dev

– Ben

Not sure if this is helpful, but I have had this issue for well over a year on just one of my DEV sites. For others it hasn’t been a problem, but then again they aren’t as big or the main one that I work on.

My fix to get my debug.log file to populate incoming errors was to simply delete everything in the app/logs/php/error.log file. Needless to say over a long period of time/coding and debugging that file was immensely full. So as soon as I cleared it my debug.log started to populate again. Hope this helps someone.

1 Like

Was this issue ever resolved? I’m having the same problem with Local v 5.2.5+2498 and WordPress 5.3.2. The logs are being written to but my debugging error_log lines are not showing up in the logs.

Make sure to clear your php/error.log and then check to see if anything outputs to it. That’s what fixed it for me. There was just too much in there for it to want to update it.

This didn’t work for me. I have like 35 sites in Local and only one won’t write anything to the debug.log

Are there any errors on the front-end of the site? It’s possible that the error is being triggered early enough in the process that WordPress doesn’t have a chance to catch it and log it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.