Questions tagged [debug]

Basic techniques on debugging WordPress that can assist you on first hand.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Access “wp site health info” data from plugin

I wanted to know if a third party plugin can access "WordPress site health info" data. If yes, than what is the correct procedure to do that? Thank you.
0
votes
0answers
8 views

Query string to disable Autoptimize CSS/JS aggregation?

Good morning, can you tell me please query string to disable Autoptimize CSS/JS aggregation? I need it for debugging. I saw it before, but now I can’t find. I want to enter _site.com/?nooptimize (...
1
vote
2answers
69 views

WordPress admin menu gap when debug mode is enabled?

After the recent update of WordPress, version 5.5.1. Whenever I enabled the debug mode, there is a 2em gap between WordPress admin menu and the bar. .php-error #adminmenuback, .php-error #...
0
votes
2answers
54 views

How to find line of code causing wordpress deprecation notices

My Site gives a few errors about notices and depreciations that I would like to fix. For example: Got error 'PHP message: PHP Deprecated: add_option was called with an argument that is deprecated ...
0
votes
1answer
46 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 ...
0
votes
0answers
25 views

Image srcset returns false for some images + Image Sizes missing from attachment

I have a weird issue going on in WordPress at the moment. Some images does not return any image sizes, and when using wp_get_attachment_image_srcset it simply returns false. I have no idea why this is ...
0
votes
0answers
133 views

How to display only PHP (Fatal) Errors 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/...
1
vote
0answers
29 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 );
0
votes
0answers
13 views

How can I auto rotate my debug.log error file?

I want to know how I can perform auto rotations on my debug.log file. If left alone, it builds up in size and contains historical logs that are likely irrelevant for problems that appear. I have done ...
6
votes
4answers
656 views

How to fix the admin menu margin-top bug in WordPress 5.5?

I recently updated a WordPress instance from 5.4 to 5.5 to end up with an annoying margin-top in the admin area, above the menu directly. I deactivated all plugins, switched themes, did some ...
1
vote
1answer
37 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 ...
0
votes
1answer
139 views

How to implement Sentry on Wordpress? [closed]

I need Sentry to track errors in my project code, the unofficial plugin for wordpress seems to be useless. How should I fix it?
0
votes
0answers
15 views

Best way to see where action originated from?

I'm trying to enhance the logging I have in the plugin. I'm using CloudWatch as a logging solution, and I have implemented monolog so that I can easily log when an action happened (email sent, images ...
0
votes
1answer
22 views

Why Do Pages Always Work Aa Expected When Logged Into The Dashboard?

I am finding that all the changes I make and preview when logged into the dashboard are just as I would like them. Once I log out of the dashboard all hell breaks loose. Pages don't display my latest ...
0
votes
1answer
68 views

Password Protected Pages Don't Accept A Valid Password After Changing The Password

I have a password protected page which I recently was asked by my client to change the password. The password protection is done from the WordPress dashboard by using the Status and visibility option ...
0
votes
0answers
12 views

Is there any easy way to find which piece of PHP generated a piece of HMTL? (Like BrowserLink in ASP.NET)

Developing in Asp.NET on Visual Studio there is a technology called Browser Link which make really easy to find which piece of PHP code is generating a piece of HTML (you can read something about it ...
0
votes
1answer
18 views

Best location for a debugging script

I am integrating Sentry.io into my multisite setup. I have 5 themes and a number of plugins across the network too. Sentry needs to be initialised as early as possible, I want it to be loaded before ...
0
votes
0answers
14 views

A bug happens in the Footer and the code keeps appearing

On this WordPress site with the Newspaper theme, the footer appears and looks normal (as you can see in https://www.vendaonline.pt/), but I installed a question plugin (DW Question Answer) and on the ...
0
votes
1answer
196 views

Debug Errors, site health

When I go to site health this is what I am seeing. Debug mode is often enabled to gather more details about an error or site failure, but may contain sensitive information which should not be ...
0
votes
0answers
13 views

Include post ID in debug log

I'm trying to debug a plugin which generates a PHP warning in WP's debug.log from time to time. I'm unable to reproduce the issue manually, so I'm wondering if there is a way to include the post ID ...
1
vote
0answers
10 views

Mute Debug Messages from Plugins

I have an older plugin installed that is firing all these PHP Deprecated and PHP Notices in my debug.log every time a page loads. Is it possible to mute PHP Deprecated and PHP Notices but ONLY for ...
0
votes
0answers
31 views

Blank White page issue in WordPress

I am working in a WordPress site in Linux Mint. My file and folder permission is like below I used below code in wp-config.php file define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); ...
1
vote
0answers
18 views

How to Debug WordPress

I put below codes in my wp-config.php file. define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define('WP_DEBUG_DISPLAY', true); @ini_set('display_errors',1); But I not getting any ...
1
vote
1answer
187 views

How to enable error logs and debug mode in WordPress using Azure Cloud?

I am using Azure Cloud, multisite WordPress and have enabled these codes in wp-config.php file. // Enable WP_DEBUG mode define( 'WP_DEBUG', true ); // Enable Debug logging to the /wp-content/...
0
votes
1answer
24 views

Getting a list of the PHP files included to generate a page

Some commercial themes have become a real mess: the header may be created by the files in the theme folder or by child theme or maybe from a legacy folder which is located inside a legacy plugin. In ...
0
votes
0answers
79 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-...
0
votes
0answers
1k views

Console Messages: A cookie associated with a cross-site resource at

I gets these error on chrome console.I added this code to my header.php: <script> response.setHeader("Set-Cookie", "HttpOnly;Secure;SameSite=Strict"); </script> But it doesnt ...
0
votes
2answers
51 views

“… logged-in …” seems top of my website

I dont know what is these mean so can you explain to fix it: class="home page-template-default page page-id-50 logged-in theme-html5blank-stable woocommerce-no-js ehf-header ehf-footer ehf-template-...
0
votes
1answer
151 views

PHP Notice: Undefined index: mytheme_meta_box_nonce

There is a bug about my metaboxes in debug.log: [12-Mar-2020 13:00:05 UTC] PHP Notice: Undefined index: mytheme_meta_box_nonce in /home/deniztas/migrate666.deniz-tasarim.site/wp-content/themes/...
0
votes
1answer
28 views

debug.log is not created

logs seem only while admin panel is loading,after page was loaded, it will hide so I cant seem the logs.Also I want to debug.log but there is no the file in wp-content. * * @link https://codex....
0
votes
2answers
76 views

Site throws 500 error after upgrading from PHP 5.6 to 7.X

If I try to upgrade to PHP 7 or up (from 5.6), I have one site that is throwing a PHP error. I have tried uninstalling all plugins and activating the Twenty Twenty theme before changing PHP version. ...
0
votes
1answer
19 views

How to identify which php file a plugin is using on page load?

I need to make some custom adjustments to a 3rd party plugin. My plan is to use PHPstorm and xdebug to dive into the plugin as it loads/operates on a product page so I can find out how it works and ...
0
votes
1answer
331 views

Conflict between Yoast SEO and my custom theme

I’ve been developping custom themes for not so long, so it is the first time I have a conflict between my theme and a plugin and I'm not really sure how to debug this exactly and fix it. When my ...
0
votes
1answer
112 views

the_posts_pagination() function returns missing page numbering on some blog pages

I have a very strange issue that I am struggling to debug without amending the core function. On page 1 of the blog archive it shows page numbers: 1, 2, 4 (page 3 is missing). On page 2 and 3 the ...
0
votes
1answer
189 views

How to display SQL query that ran in WC_Order_Query?

Using WP_Query you can do: (new WP_Query($arguments))->request to get the raw SQL code that was executed. But how can you do this with WooCommerces WC_Order_Query or wc_get_orders?
1
vote
1answer
154 views

Huge debug.log because of “undefined offset in media.php”

Recently debug.log (WP 5.3.2) grew to 17GB because of tons of entries like this: [17-Jan-2020 16:29:01 UTC] PHP Notice: Undefined offset: 1 in /wp-includes/media.php on line 790 [17-Jan-2020 16:29:...
1
vote
0answers
52 views

WordPress Multi-site network tab throwing 'Error too many redirect errors'

Has anyone come across this issue.. whenever I try to access the /network section of my multisites it doesn't work which just started recently. It throws a ERR_too_many_redirects error and just shows ...
0
votes
1answer
649 views

Error on add_submenu_page() declaration

Was called incorrectly. The seventh parameter passed to an add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was ...
3
votes
1answer
293 views

Does the debug.log do log rotation?

This is more like of an inquiry. So I enabled my WP_DEBUG_LOG to true. It does work though, debug.log is in my wp-content's directory. But does it also do log rotation like different file for each day?...
0
votes
0answers
161 views

How to trace errors in debug.log for WooCommerce 3.0?

I found a debug log error that states: price was called incorrectly. Product properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-load.php'), ...
0
votes
0answers
16 views

Debug a WP install: how to find which functions write post updates during a process (a woocommerce checkout in my case)

I hope this question is not too broad or not the right format. But the subject at hand is one of the vaguest: debugging. For the TLDR crowd out there, the actual question is in bold in the 'What I am ...
1
vote
0answers
621 views

Error message prevents access to WP

This message appears Attempt to create object of class W3TC\DbCache_WpdbNew has been made, but file /home/***/wp-content/plugins/w3-total-cache/DbCache_WpdbNew.php doesnt exists #0 ...
0
votes
1answer
89 views

Wordpress website working fine on localhost but not displaying front pages on webhost

The website works perfect on my localhost. I used duplicator plugin to upload it on my web-host. Database connections are established since mywebsite.com/wp-admin works perfect. I can login the ...
-2
votes
1answer
41 views

How to check whether functions is deprecated or not?

Can you please tell me if this code is up to date? Thanks in advance. function setmot_turta_notice() { if ( is_product() && has_term( array('set-turta','set-mot' ), 'product_cat' ) ) { ...
1
vote
1answer
334 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 ...
0
votes
1answer
87 views

Getting value of variable from functions.php and debugging it

I am trying to inspect a variable obtained in functions.php for debugging purposes. I am defining a variable $current_user by executing the shortcode to obtain the current logged-in user. Then I am ...
1
vote
0answers
25 views

Problem In Advance search Plugin [closed]

I write a plugin. it has the ability to filter post by category and also its subcategories. I get some error and I don't know why I get it! I commented on the errors. Could you help me? function ...
0
votes
1answer
890 views

problem with size of debug.log file

my debug.log file in wp-content size in above 4GB and have trouble with that. can I delete this file from the server? if delete debug.log file ، No problem with my site? Does everything correctly run ...
0
votes
1answer
103 views

How can I find the cause of a 500 server error?

I'm not sure if this question fits this site, since the title specifically mentions development of WordPress. Anyway, i am running a Linode Debian Stretch server that I just built. Previously, I was ...
1
vote
0answers
30 views

How to debug my custom login form looping intermittently

I have a custom log in form for users of my website where they can log in then view some information that related to them. The problem is sometimes this form will loop. I will get the message "login ...

1
2 3 4 5
7