Questions tagged [wp-debug]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
69 views

Automated WordPress update failed to complete - but all updates fail with code -1

I have a WordPress website on my Ubuntu machine. I do use auto-updates and auto-updates for plugins. After I logged in recently I saw that a couple of plugins didn't update, as well as WordPress ...
RayofCommand's user avatar
0 votes
1 answer
45 views

Fatal error trace not shown in development setup

I recently re-did my local dev setup and have been seeing these types of fatal error warnings: There has been a critical error on this website. Please check your site admin email inbox for ...
kontur's user avatar
  • 133
0 votes
0 answers
37 views

Many big issues in the website, WP_Debug not showing

I have this website https://itds.pl/ suddenly it started working really bad and I can't find the reason. Website is Multi website system Using WPML Using ACF Have two domains: Main domain Eng and has ...
Tanya Nami's user avatar
2 votes
2 answers
3k views

Wordpress 6.x / PHP 8.x deprecated warnings in development environment

The problem: I want to run Wordpress 6.x with PHP 8.x in development mode - meaning define('WP_DEBUG', true); but Wordpress 6.x partial support for PHP 8.x throws a lot of deprecated warnings which do ...
Picard's user avatar
  • 1,085
2 votes
1 answer
326 views

How do you change error reporting to only show errors in WordPress?

I'm working on a development site that has some plugins that produce notices. It's a bit annoying during development when you only want to see the errors your own code produces. How can you turn off ...
TheKidsWantDjent's user avatar
0 votes
1 answer
45 views

website has a bug

Wordpress website Red Bug shown in top line, I have an error message: NOTICE: wp-includes/functions.php:5313 - WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To ...
Diana Arnold's user avatar
0 votes
1 answer
120 views

There is no any line related the error but it says critical error

My website says critical error on website after add my custom code but there is no any line related my custom code in log file.There are only 2 repater lines and they are standard for my website, not ...
Faruk rıza's user avatar
1 vote
0 answers
19 views

WP_DEBUG must be on, otherwise edit post or page will show 404 error

encountered a very strange error: my WP_DEBUG must be on (set to true), otherwise editing post or page at the admin panel will show the 404 error. While the save post/page can still be seen. The ...
user199004's user avatar
0 votes
3 answers
239 views

Why does WordPress keep showing me error messages?

I'm trying to hide error messages on a WordPress installation on a shared hosting. I added the following code to my config. ini_set('display_errors','Off'); ini_set('error_reporting', E_ALL ); define('...
TheKidsWantDjent's user avatar
1 vote
1 answer
55 views

Wordpress: Adding Security

Regarding this answer, is correct to add the file debug.log in this way? RewriteRule (?:debug|readme|license|changelog|-config|-sample)\.(?:php|md|txt|html|log?) - [R=404,NC,L] Kind Regards
Ponzio Pilato's user avatar
1 vote
1 answer
696 views

WordPress customizer Preview not loading

I'm creating a WordPress website, today I have tried to add some new features but I'm not able to add because customizer live preview is not loading I have done some steps Update all theme and plugin ...
shubham's user avatar
  • 11
0 votes
1 answer
1k views

error log is going to the wrong location, WP_DEBUG_LOG is ignored

My WordPress error log is going to /var/log/php-fpm/www-error.log. That's not where I want it. In fact, it took me too long to figure that out. (I'm new to WP and PHP). I've tried to redirect it with ...
Elroy Flynn's user avatar
1 vote
1 answer
1k views

How to display only specific Error types in debug.log? No notices, warnings, etc

I can't find the right way to make it work. I tried many things, like putting this in wp-config.php define('WP_DEBUG', true); define('WP_DEBUG_DISPLAY', false); define('WP_DEBUG_LOG', 'wp-content/...
Viktor Borítás's user avatar
1 vote
2 answers
545 views

Wordpress not writing error.log

My local development WordPress install on ServerPress is not writing error logs. I made changes to my wp-config.php file to enable error log writing for WordPress, and also tried editing the php.ini ...
chromechris's user avatar
1 vote
0 answers
133 views

PHP-FPM Wordpress Debug

Is there any way to get WP_DEBUG to log errors when running PHP-FPM? define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); define( 'SAVEQUERIES', true );
Gnosis's user avatar
  • 13
1 vote
1 answer
157 views

How to show the error causing the 'There has been a critical error on your website'?

I'm getting the error: 'There has been a critical error on your website. Learn more about debugging in WordPress.'. How do I display which error I'm getting in the frontend? I have these three lines ...
Zeth's user avatar
  • 788
1 vote
1 answer
741 views

Wordpres debug.log PHP Notice: is_singular was called

I have started to get alot of "is_singular was called" and "is_page was called" in my debug.log [31-May-2020 12:10:27 UTC] PHP Notice: is_page was called <strong>incorrectly</strong>. ...
Gabriel's user avatar
  • 11
0 votes
0 answers
402 views

How do I specify where to save the debug.log?

According to the documentation cited below I should be able to add a path to save the debug.log at but it does not seem to be working for me. https://wordpress.org/support/article/debugging-in-...
upsDuck's user avatar
0 votes
1 answer
25 views

I have this error notice 'wp_enqueue_script was called incorrectly' in my plugin

I have read all the previous posts about this but can't seem to get my head around what is wrong with my code. This is in a plugin that I have written. I thought I had it sorted but looks like I haven'...
Colin's user avatar
  • 135
1 vote
1 answer
543 views

XAMPP-VM Mac OS Mojave wordpress debugging using XDebug

Someone please point me to a knowldge article or information on how to setup Xdebug on XAMPP-VM Mac OS in particular. The dev configuration: XAMPP-VM Mac OS Mojave 10.14.6 VScode with PHP debug ...
NiRUS's user avatar
  • 113
0 votes
5 answers
2k views

Warnings even when the WP_DEBUG set to false

The link https://vreqenz-stream.de/shop/ throws warning when opened on some devices and not on others. I thought it may be a cahce issue but I have cleared cache from WP-rocket and also browser. Just ...
veetrag's user avatar
  • 11
0 votes
1 answer
813 views

Is it possible to enable and disable wp debug from functions.php?

I want to make 'WP_DEBUG' true or false from functions.php. Is it really possible?
gaurav mishra's user avatar
3 votes
3 answers
5k views

error_log is not working as expected in functions.php file

Error log on my index file get logged in the error_log.txt file but the same error log is not working in the functions.php file. I am using the latest WordPress and PHP 7.0. I am not using any plugin ...
Amit Pandey's user avatar
1 vote
1 answer
483 views

Same log message keeps on printing to debug.log file thousand of times

So i was debugging my PHP code while working with Wordpress site by writing to debug.log with error_log($message) or trigger_error($message). My message in these log statements keeps on printing ...
Utsav Madaan's user avatar
0 votes
1 answer
535 views

Wordpress Cron job, 302 response

I am trying to debug a cron job in wordpress. It's supposed to update user hours but doesn't, and after putting some test statements in the code, I'm not too sure it's even running. I have debug ...
ellen's user avatar
  • 335
0 votes
0 answers
251 views

admin_post_(action) hook create console log error

In latest WordPress if web page has <input type="hidden" name="action" value="action_name"> input field with name=action then it create console log error. But this happen maybe 4.9.5/6. However....
mlimon's user avatar
  • 400
1 vote
1 answer
101 views

List $wp_admin_bar menu items (debug)

I would like to dump the content of the $wp_admin_bar object in order to remove some menu items with the remove_menu() method. What is the suggested way to do it without printing anything on the ...
Stefano Tombolini's user avatar
7 votes
2 answers
18k views

Debug.log file is never created?

It's the first I have seen this. In a project I'm working on, I tried to switch on the debug mode for wordpress to see logs. Even if I activate the debug_log in wp-config.php, debug.log file is never ...
J.BizMai's user avatar
  • 810
0 votes
0 answers
281 views

Notice: Undefined index: post_title error

This is my code: function insert_custom_post_test($args){ $args['post_content'] = ''; $args['post_status'] = 'publish'; if($args['post_title'] == 'test_title'){ // Code ...
John's user avatar
  • 23
1 vote
1 answer
1k views

Using debug log in production, is that a security concern?

Is having the WP_DEBUG_LOG enabled, and having a debug.log in a production environment a security issue?
baswijdenesdotcom's user avatar
2 votes
1 answer
518 views

What does this message from WP_DEBUG mean?

I have been having server 500 errors on 3 separate WordPress websites over the last while. (The problem BTW does seems to be related to the wordpress_logged_in***** cookie because deleting that always ...
byronyasgur's user avatar
  • 3,022
0 votes
1 answer
2k views

WordPress debug messages not displaying

WordPress is not displaying any errors / debug messages, even though I double- and triple-checked every setting. In php.ini, I have error_reporting = E_ALL & ~E_NOTICE display_errors = On ...
Ginchen's user avatar
  • 121
4 votes
1 answer
2k views

How to debug when error_log not working as expected

Trying to debug my development and running into a lot of frustrations with lack of output in the debug.log. For example, I have this defined in wp-config.php: define( 'WP_DEBUG', true ); define( '...
Philip Ingram's user avatar
0 votes
0 answers
1k views

Cannot read property 'hasClass' of undefined(…) jquery-ui

I have in my console informations about some problems: [screen from browser console][1] It causes that I can't quick edit my post, I can't turn on screen option in admin panel, and drag&drop ...
Marek's user avatar
  • 35
3 votes
1 answer
7k views

Inserting Post Using wp_insert_post. How to Fill Yoast Plugin SEO Fields

I am inserting posts into a database using wp_insert_post function once the post is inserted using below line of PHP $postId = wp_insert_post($array) I can insert values in my advanced custom fields ...
Sourabh Modi's user avatar
10 votes
3 answers
10k views

Suppress deprecated notices

When I use: define('WP_DEBUG', 1); In my wp-config.php, it works fine, but I am hacking an old theme and I would like to suppress deprecated notices. My understanding is that adding this: ...
Chris Pink's user avatar
3 votes
2 answers
3k views

Where should I tell WordPress where error_log messages should be written?

I have two different instances of the same server (one for development, one for deployment), built independently but basically the same (same OS, same WordPress version, same content etc.). However, ...
IpsRich's user avatar
  • 149
0 votes
2 answers
4k views

"Undefined index" error when saving empty array with checkboxes

In my plugin settings page, I have a list of checkboxes that store the value into an array. While the it works as expected, whenever I uncheck all of the checkboxes and save those changes I get the ...
Ethan O'Sullivan's user avatar
1 vote
3 answers
7k views

Undefined constant with debug set to true

I have used to following code to change the location of 'single' Wordpress templates. define(SINGLE_PATH, TEMPLATEPATH.'/single/'); add_filter('single_template', 'lsmwp_custom_single'); function ...
James's user avatar
  • 248
0 votes
0 answers
58 views

Unnessary character on post after restore

Recently i restored the wordpress post . Now I am getting so much problem with it. In post there are unknown characters like  like you can see in There are othermany such character. I actually want ...
stlawrance's user avatar
5 votes
3 answers
19k views

How to debug vars inside function at functions.php file?

I have this function: function wpse_210493_apply_advertising_position( &$posts, $return = false ) { $ad_posts = array(); $content_posts = array_filter( $posts, function ( ...
ReynierPM's user avatar
  • 537
13 votes
1 answer
11k views

How to check if debug is true and can I use it for my own code? [duplicate]

I'm needing to debug one of my themes and I want to be able to switch on a debug mode so I can output more information or switch off debug mode and not see any information. I noticed there is a ...
1.21 gigawatts's user avatar
1 vote
1 answer
4k views

How to fix Uninitialized string offset: error on a checkbox in WP Settings API

I am trying to create an options page with a checkbox field. The checkbox is working fine but when I uncheck it and save settings, an error string shows on Notice: Uninitialized string offset: 0 in ...
bakar's user avatar
  • 101
0 votes
1 answer
59 views

Debugging conundrum with a problem fixed by enabling WP_DEBUG

I've got a site that has a plugin that causes problems with the admin-ajax.php file to have 500 internal errors when its turned on. The plugin causes this issue in the ajax file even on pages of the ...
AdamJones's user avatar
  • 298
1 vote
1 answer
3k views

Which language files are loaded?

Is there a way to print a list of the loaded language files for debugging reasons?
wittich's user avatar
  • 173
0 votes
2 answers
175 views

Style WP_Debug?

Is there any way to style the message delivered by wp_debug? Whenever I set WP_Debug to true, it pushes all my content down the page. While I admit it's easy to just set it back to false after using ...
Bryce's user avatar
  • 1
3 votes
1 answer
3k views

Prevent wp_debug from polluting ajax within plugin

I've ran into an issue here where wp_debug notices foul up my ajax response. The codex suggests using ob_clean just before returning or echoing: To parse AJAX, WordPress must be reloaded through ...
orionrush's user avatar
  • 890
0 votes
1 answer
41 views

what are WP_DEBUG conditions?

i'm trying to debug my theme using below code to find out some errors,do i need to fix all errors or is it OK when i ignore some of them? error_reporting(E_ALL); ini_set('display_errors', 1); define(...
Dragut's user avatar
  • 171
0 votes
1 answer
126 views

How do I set up Debugging?

In my wp-config.php, I have: // Enable WP_DEBUG mode define('WP_DEBUG', true); // Enable Debug logging to the /wp-content/debug.log file define('WP_DEBUG_LOG', true); // Disable display of errors ...
Murgittroyd's user avatar
0 votes
1 answer
872 views

Disable Debug Log Programmatically

I'm trying to disable WP_DEBUG_LOG if and only if debug.log exists. I'd like to hook into wp_footer and test if the file exists and if so disable my debug log. All I've found though is that ...
Howdy_McGee's user avatar
  • 20.3k