Skip to main content

Questions tagged [debug]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
66 views

Error logging in wordpress

I set define( 'WP_DEBUG', true ); & define('WP_DEBUG_LOG', true);. But error_log('hello'); is not printing any thing. What could be the issue ?
Foysal's user avatar
  • 449
0 votes
0 answers
34 views

Dropdown menu only appearing when logged in

I'm having a problem where the Hamburger dropdown menu only appears when I'm logged in, I tried on multiple devices and I tried clearning the cache and removing all plugins (except elementor, without ...
French Noodles's user avatar
0 votes
1 answer
28 views

write developer debug statements to separate log

Is there a way to write the debugging I do in my code (ex: error_log("$msg"); to a different log file than the rest of the system-generated logging that gets written to /wp-content/debug.log?...
Daveh0's user avatar
  • 191
0 votes
0 answers
127 views

I'm getting this 'PHP Deprecated' issue

PHP Deprecated: Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead. in /container/application/...
Kleirk Acordon-Gacula's user avatar
1 vote
0 answers
367 views

"Object-cache.php" disables wp_cron and even disables my entire site, and keeps reappearing by itself again after I delete it

I'm having a truly maddening issue. It may involve plugins (or it may not, I don't know) but I believe it is sufficiently technical to be allowed here. A few weeks ago, I needed to revert to a backup, ...
John Smith's user avatar
0 votes
0 answers
19 views

How do I see logs of critical errors of specific pages without enabling public debug for everyone?

I have a site that works well in production, say with N pages currenly being used by users. I am doing some PHP scripting in one specific page and I want to debug some data. Usually in projects not ...
Xavi Montero's user avatar
1 vote
1 answer
295 views

How can I use xdebug with wp-cli

I'd like to use xdebug and vscode to debug a script I'm running via wp eval-file. My launch.json is pretty basic. { "name": "Listen for Xdebug", "...
JJS's user avatar
  • 123
3 votes
0 answers
255 views

How to find code responsible for warnings from wp_cron runs?

I have a website created using wordpress, which is hosted on accuwebhosting.com Recently I have been getting emails with the subject line "Cron user@server cd wpfolder && /usr/local/bin/...
noravanq's user avatar
0 votes
0 answers
193 views

Finding plugin that makes this part of page (finding sweetwinsprizes.info virus's origin)

I have a website with several plugins installed. in 70% of page loading everything is OK and header is something like this: <head> <meta charset="UTF-8"> <link rel=&...
qwerty13's user avatar
0 votes
0 answers
30 views

ERROR during Wordpress Installation "There has been a critical error on this website."

I am installing the wordpress 5.8.6 version...but during the installtion I got this error.. I'm trying to resolve it by renaming the plugin folder name and by also debuging mode in true mode...but all ...
MUHAMMAD HASSAN ULLAH's user avatar
0 votes
2 answers
86 views

Platform sh site setup in localhost gets Cookie error

I have setup up a WordPress project from Platform sh in my local host. I get get the project by using the platform get [id] command. I Imported the database in my localhost and configured the wp-...
tek bhatt's user avatar
0 votes
0 answers
18 views

"-2" Postfix added at the end of the permalink [duplicate]

I know -2 comes due to having duplicate names either in post/pages or media files. But I don't have any such duplicate name. In fact, I tried installing WordPress from scratch and tried to create a ...
Sarmad Nadeem's user avatar
0 votes
1 answer
848 views

WordPress Throwing Deprecated Errors on its own Files

My WordPress Website is throwing PHP Deprecated Errors on wp-include files. I am novice WordPress Developer working on my site. I am being flooded by these errors and extremely high CPU consumption on ...
Amit Bajar's user avatar
0 votes
2 answers
139 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
1 vote
1 answer
49 views

Submenu items not working anymore

Not sure where I am going wrong here... Submenu items in my website have stopped working across entire site with custom links/anchor tags. Examples: https://bell.works/new-jersey/on-the-block/ (Sub ...
JadaLeigh's user avatar
0 votes
2 answers
37 views

when I Try to Create new Post or Page it goes Draft(I can't post Anything)

I have Done Some Debugging is there: 1, Deactivate Plugins 2, Switch Themes 3, Update plugins & themes 4, update the WordPress version 5, in functions.php : function remove_dashboard_widgets() { ...
Jabir Shaikh's user avatar
1 vote
1 answer
348 views

Wordpress not available to file using wp-env for xdebug requests

I'm using Wp-env to develop a plugin as it's a pretty robust wrapper for Docker that includes phpunit and xdebug. However, I have been struggling to get xDebug working. From my_plugin directory run ...
MikeiLL's user avatar
  • 579
-1 votes
1 answer
643 views

My wordpress site memory exhausted more than 1GB trying to debug with default

My wordpress site memory is exhausted [02-Nov-2022 08:41:33 UTC] PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 262144 bytes) in /home/ahzabcollections/...
Malik Hamza Younas's user avatar
0 votes
0 answers
25 views

Running xDebug and NPM at the same time?

I'm wondering whether the following is possible. WordPress scripts is set up in the theme folder. xDebug is set up in the WP installation folder. So for each, a separate folder should be opened in VS ...
Pbalazs89's user avatar
  • 115
0 votes
0 answers
51 views

3,840 cronjobs with no action!

I have a site which constantly has nearly 4,000 cronjobs with no action. If I delete a number of these jobs they come right back, generally to the same number. I've tried switching back to the Twenty ...
Sandbox Wizard's user avatar
4 votes
3 answers
5k 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,155
0 votes
1 answer
36 views

Solution to White Screen of Death that does not require Web Server access?

I'm working on a live website, updated a plugin and got the dreaded White Screen of Death. I know exactly how to resolve the problem; simply deactivate or delete the plugin I upgraded. The problem is ...
sazr's user avatar
  • 357
2 votes
1 answer
1k 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
328 views

Unable to get a simple plugin admin page to work

Even though I have years of software development experience, I am new to WP & PHP development, so please bear with me. After reading through the plugin manual, I started with a WP plugin boiler ...
helgew's user avatar
  • 111
0 votes
0 answers
3k views

Can't get rid of JQMIGRATE: Migrate is installed, version 3.3.2. Manually updated all the libralies and site. 5.8.2

Answers I found here are about the older versions of WordPress when it were transitioning into a new version of jQuery. (This is version 5.8.2) Since the one from WordPress is not logging active, I ...
enix's user avatar
  • 1
0 votes
0 answers
26 views

strange characters in debug file

recently I get a weird log in WordPress debug file [09-Dec-2021 20:26:57 UTC] 03AGdBq27pjsLRdeIVXfN_q2XMOOFf1OY3rFj5GIEfJHVBrzTHplTE0-...
D.JCode's user avatar
  • 201
0 votes
0 answers
36 views

Debugging JS errors

I'm struggling with this error and would appreciate some help. Wordpress with the MasterStudy theme and then MasterStudy LMS plugin. Elementor on top. Everything up to date. I have a caching plugin, ...
Boxhamster's user avatar
0 votes
1 answer
454 views

Where exactly do I write define( 'WP_DEBUG', true ) in wp-config file

would anybody know where I would write WP_DEBUG in wp_config file. I don't see it there. I would like to check why my javascript is not working. I have enqueued everything with php in the functions....
Spencer Halstead's user avatar
0 votes
1 answer
23 views

Home Dashboard Screen Options always change

Like any other WordPress user I have installed a few Themes and Plugins. I recently noticed that the boxes on my Home Dashboard change every now and then and only 3 of them they are always there: ...
Francesco Mantovani's user avatar
0 votes
1 answer
154 views

Can not login to wordpress site after resolving white screen of death

I had a white screen of death that I was somewhat able to resolve. I updated PHP from 7.0 to 7.3.2, removed BOM from wp-config.php, and deleted wp super cache plugin. From looking at others issues ...
Danger14's user avatar
  • 219
0 votes
1 answer
120 views

Debugging in WordPress at Theme installation [duplicate]

I am trying to upload a Theme. But I am getting message Please select a file. I placed below code in wp-config.php file. define( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', false ); define( '...
abu abu's user avatar
  • 203
0 votes
1 answer
757 views

How to get the full stack trace for WordPress "table doesn't exist" error in debug.log?

I'm getting a WordPress "table doesn't exist" error in my debug.log, but unlike most errors it doesn't give a full stack trace to help me isolate the code. Anyone know how to tell WordPress ...
Martin_W's user avatar
  • 103
2 votes
2 answers
4k views

WP_Debug not displaying anything

In wp-config.php I have included: define('WP_DEBUG', true); define('WP_DEBUG_LOG', true); As I understand, this should display certain information on every page, also if there are no errors. However, ...
Nick's user avatar
  • 127
0 votes
1 answer
201 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
0 votes
1 answer
455 views

Display Custom Taxonomy Dropdown posts

I wanna display posts of my custom taxonomy in a dropdown list, I mean I create a filter for taxonomies in my custom post type I have 2 different types which contains some sub-category & in that ...
Moiz Aslam's user avatar
0 votes
1 answer
69 views

Can Someone Help me to Correct my shortcode for displaying a category?

Actually the problem is in this code that is, If I put the id directly in "terms" of any post type like; [arts-list 10], then this type of post which contains this id displays the posts on ...
Moiz Aslam's user avatar
0 votes
0 answers
28 views

Correct my shortcode for displaying a category?

function diwp_create_shortcode_arts_post_type(){ $atts = shortcode_atts( array( 'type' => ' ', ), $atts ); $args = array( 'post_type' => 'arts'...
Moiz Aslam's user avatar
0 votes
0 answers
935 views

var_dump() and print_r() display null in php

I am trying to debug php and it would help me if I could display some variables. When I add var_dump($value) and print_r($value) to functions.php they show Null. When I add var_dump($value) and ...
Mr_G's user avatar
  • 13
0 votes
0 answers
80 views

File is executed twice if plugin is activating

I have an issue with my plugin. I run an function if the plugin is activating this function include a file. But if I activate the plugin the file is included twice. Is this normal or an bug in ...
Jop's user avatar
  • 127
0 votes
3 answers
740 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
0 votes
2 answers
775 views

Fatal error: wp-settings.php on line 199

I'd love to know how to get back into wp-admin and get my site back online. I contacted GoDaddy tech support again today and the PHP is supposedly updating.. Wordpress has been complaining about the ...
Teale Miller's user avatar
0 votes
0 answers
171 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.
sonill's user avatar
  • 145
1 vote
2 answers
863 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 #...
Marlon's user avatar
  • 31
0 votes
2 answers
2k 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 ...
Will's user avatar
  • 352
1 vote
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
3k 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
0 answers
152 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
15 votes
5 answers
5k 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 ...
Braza's user avatar
  • 251
2 votes
1 answer
182 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
  • 888
1 vote
1 answer
1k 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?
Asaf M's user avatar
  • 142

1
2 3 4 5
7