When developing it’s a good idea to enable debugging, as described in this article in the developer handbook.
Essentially in wp-config.php you want to define the WP_DEBUG
as true
.
define( 'WP_DEBUG', true );
This will cause WordPress to output more errors and warnings to the screen, which can help finding issues. You can also log these to wp-content/debug.log
by setting WP_DEBUG_LOG
to true
:
define( 'WP_DEBUG_LOG', true );
In 5.2+ you might also want to disable the ‘fatal error handler’, which is responsible for the screen that’s displaying the “the site is experiencing technical difficulties” message.
define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );
Just keep in mind that none of these should be turned on in a live environment.
Related Posts:
- Why is wp_head() creating a top margin at the top of my theme header?
- How To Add New Option Types To Option Tree?
- How to limit wordpress menu depth in admin panel
- How can I set image sizes and still have responsive images using the srcset attribute?
- Possible to “Attach” images to multiple posts without inserting or uploading twice?
- Trigger Customizer saving process with Javascript only
- Remove settings if theme is deleted?
- Adding customizer styles with wp_add_inline_style
- Comment form not display properly?
- How to add menu support to a theme?
- Adding widgets programatically: how to avoid collisions?
- Moving functionality from functions.php to classes?
- Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying
- How do I get a parent theme modification from a child theme?
- Removing the default sidebar from admin panel
- Extend walker – navigation, adding data attribute to a tag
- How to display category specific post content on a page
- Is there any need to use both wp_reset_postdata and wp_reset_query together?
- how to pull wordpress post comments to a external page
- Enqueued Stylesheets Effecting Admin Styles
- Gutenberg Reusable Block as part of WordPress Theme page
- Why is $GLOBALS[‘content_width’] needed if site is responsive?
- How i can get widgets areas working in customizer?
- Does WordPress count as a means to learn web development? [closed]
- current-menu-item class not working
- Prevent theme from activating [duplicate]
- Messing up with transient API – getting flushed on refresh
- Correctly using wp_head()
- Theme development question regarding layouts
- Cannot figure out how to overwrite files in child theme
- Using wp_tag_cloud(‘format=array’) to print tag names without links?
- Link to a .po file in a child theme
- My Admin bar covers my sticky navbar [closed]
- Responsive embed for the video shortcode
- Access theme options in templates
- How to show post from category select
- Single Page Design, Storing in Theme Options
- How to append to menu items selectively
- Working with a WP Starter theme
- tag is being auto inserted
- “Bad element for masonry: undefined” why this error us occuring? [closed]
- Scroll to position on page for category pages only — woocommerce
- How remove render blocking css from wordpress when you build a theme?
- How to: JQuery multiple wordpress media uploader buttons in the same options page?
- Move default page templates to sub directory
- Displaying details of a post in a sidebar
- How to upload/update theme from local – bitbucket – shared hosting?
- Multi-page posts: A subdirectory for each post?
- Remove “You are using WordPress 3.2.1” from Right Now Dashboard Widget
- How do I get the trackback count of a post in wordpress without writing an SQL query?
- Load sidebar template just once to prevent multiple animations
- Call to require(‘../../../wp-blog-header.php’) results in 404 error?
- Where do files uploaded via Media Manager get stored in MU?
- Change frontpage content via WordPress
- How to Have a Pure HTML Sub Directory In WP Site
- How to add menù section to my WordPress template?
- What are the critical theme files when building a custom theme?
- Linking beetween pages in wordpress
- customize theme with get_template_part() [closed]
- Loading issue on Chrome for my WordPress theme
- How to add post meta fields to an article’s as meta elements
- Callback Function Not Firing On Selection In Media Uploader
- tag__in does not return posts
- Add content after get_header
- Filter didn’t work on content class (hybrid_post_attributes)
- How to remove bullets from widget
- Link to RSS feed not clickable?
- Exclude function from homepage only?
- Adding google fonts to WordPress theme
- Require once a general library
- wanted to sort the wp_query array by two ACF field (Year and month)
- 3 Level Menu Navigation (3rd Level not displaying)
- makeing a terms of use page that is part of the theme
- How to make menus, footer, sidebars multi language
- Unable to delete option
- Different templates for each category level
- overlay post title over post’s featured image
- Child theme in separate WordPress Install
- Display problems in admin dashboard when creating a new theme from scratch
- Hook in parent theme Menu function
- How to add custom nav_menu_css_class to certain menu only?
- Using Customizer value in an external PHP file inside a theme
- How to avoid Ajax in wordpress theme in making mulitple request?
- Import from HubSpot COS into WordPress 4?
- WordPress 3.5 + Foundation 5 not working on IE9
- Any disadvandages if I style the wordpress align classes without img and .wp-caption prefix
- Simple loop with shortcode rendering problem
- Theme automatically inserting “more” tag on every post
- Using wp_enqueue_script with social media buttons?
- Want to include ad code after related post
- Conditional tags issue for multiple is_page() conditions in sidebar.php
- How can disable function wp_link_dialog()
- Pagination adds product to cart Woo-Commerce
- Onepage with shortcodes
- Allowed memory size of (…) exhausted
- have_posts() return false on single post
- Twenty sixteen – full height
- Add wrapper for a specific sub-menu
- Theme’s featured image option is not showing up
- Not Able to Access Terms Under Custom Taxonomy Archive