Skip to content
Help Center
  • Pricing
  • ProductsExpand
    • Premium BundlesGet all the tools you need in one bundle
    • Kadence ThemeLightning-fast performance theme for modern websites
    • Kadence BlocksDrop in ready designs with advanced controls for pixel perfect websites
    • Kadence Shop KitCreate a more effective WooCommerce shopping experience
    • Kadence ConversionsBoost sales and build engaged audiences with popups and banners
    • Kadence InsightsEasily create A/B tests. Optimize your pages to drive higher conversions.
    • View All Products
  • AI Starter Templates
  • Blog
  • SupportExpand
    • Help CenterProduct Questions? Not sure how to do something? Start here
    • Support TicketsNeed help? We love to help our customers
    • About usCrafted with love in Missoula, Montana
    • Contact usPre Sale Questions? Need help purchasing?
Account Account
Get Kadence
Kadence Theme
  • Features
  • Pro
  • Starter Templates
  • HelpExpand
    • Documentation
    • Facebook Group
    • Submit a Ticket
    • Feature Requests
    • Roadmap
    • Changelog
Help Center
Kadence Theme

Kadence Theme

  • Create a Full Screen Landing Page

Getting Started

  • Theme Installation
  • Getting Started with a Classic Starter Template

Customize Settings

  • How to customize the Kadence Footer
  • Responsive Breakpoints in Kadence
  • How to Import, Export, and Reset Kadence Theme Customizer Settings Using Starter Templates Plugin
  • How to use the Kadence Theme Color Palette
  • Typography and setting font sizes for different devices
  • How to setup Page/Post settings
  • How to Add a Sidebar
  • Sticky Sidebars
  • How to style Buttons
  • How to add Scroll To Top

Header

  • How to Customize the Kadence Header
  • Customizing the Mobile Navigation Area
  • How to Use a Transparent Header
  • Customizing the Topbar
  • Navigation Colors (Transparent Header, Sticky Header)
  • Edit Dropdown Menu Styling
  • Working with the Sticky Header
  • Social Media Icons in the Header
  • Editing a Row in the Header

General WordPress

  • Set Site Favicon
  • How do I add Custom CSS
  • Adding Google Analytics
  • How to backup my site?
  • How to add a Custom Post Type
  • Fix: Page Not Updating
  • How to Find the Page or Post ID
  • How to prevent spam comments
  • How do I turn off comments?
  • How to Remove All Spam Comments

Troubleshooting

  • Troubleshooting the “Update Failed: Service Unavailable” error when updating Pro Kadence WP plugins
  • How to Enable the WordPress Error Logs
  • WordPress Error “Incompatible Archive”
  • Temporarily deactivating plugins
  • How to View Console Log Errors
  • Clearing Your Website Cache
  • How to preview the mobile version of your site on Desktop
  • Getting 500 error
  • Broken Styles after version 1.1.15

Advanced

  • Common Code Snippets for Kadence Users
  • How to translate using LocoTranslate
  • How to hook elements inside of post or page content
  • What Is a Child Theme, Should I install one, if so How?
  • How to add a custom filter or function with Code Snippets
  • Adding Custom Fonts to Kadence
  • How to make a custom 404 page
  • How to change a theme icon to something custom
  • Change any text on your site
  • Changing Various Heading HTML Tags
  • Adding Google Tag Manager with a child theme or code snippet plugin
  • Replace Author HTML (Multiple Author Support)
  • Theme hooks

Pro Addon

  • Kadence Maintenance Mode
  • WooCommerce Addons
  • How to Display Custom Post Types with Kadence Elements Templates and the Post/Grid Carousel
  • How to use conditional header
  • Theme hooks
  • Kadence Theme Pro Plugin
  • Header Addons
  • How to create a Mega (multicolumn menu)
  • How to add contact information
  • How to add a toggle open menu for desktop
  • How to use the Color Palette Switch (Dark Mode)
  • How to add a login and account Menu
  • Kadence Custom Fonts
  • How to add scripts in header/footer
  • How to open the side cart when a product is added to cart
  • How to use Element Hooks

Kadence Elements

  • What is Kadence Elements?
  • Installing Kadence Elements
  • The Four Types of Kadence Elements
  • Switching between different Kadence Elements Types
  • Showing/Hiding Kadence Elements Settings
  • How to Create a Kadence Elements Content Section
  • Creating a Template Element
  • What goes into an element?
  • How to Replace the Footer Using a Kadence Element
  • How to Use an Element to Replace the Archive Loop Item Content
  • How to Design a Post Grid/Carousel using a Kadence Element

Woocommerce

  • How to Add Image Switch on Hover for Product Archives
  • How to Add a Mini Cart to the Site Header
  • How to Change the WooCommerce Product Loop Title Tags
  • Home
  • Knowledge Base
  • Kadence Theme
  • Kadence Theme
  • Troubleshooting

How to Enable the WordPress Error Logs

When troubleshooting issues on your WordPress website, Error Logs are a valuable tool for diagnosing the underlying problems that could be affecting your site’s functionality. By enabling the WordPress Error Log, you can track PHP errors and warnings, making it easier to pinpoint and resolve potential issues. For example, whenever a website receives a Critical Error, an error usually can be logged and examined for diagnosis. This can be extremely useful when determining where an issue on your website is coming from. This document will walk you through the steps to enable and view WordPress Error Logs effectively.

Table of Contents
  • Accessing the wp-config.php file
  • Enabling Debug Mode and Error Logging
  • Viewing the Error Log
  • Disabling Debugging After Use

Accessing the wp-config.php file

First, you’ll need to access your WordPress files. You can do this by connecting to your website via FTP, using your hosting provider’s file manager, or browsing the files locally if you’re working in a local environment. Once you’re connected, navigate to the root directory of your WordPress installation. This is the main folder that contains essential directories like the wp-content folder and important files such as the .htaccess and wp-config.php files.

Local Directory Sample
Example of a local directory.
Host File Editor Sample
Example of hosting file manager.

To access your files via FTP, you’ll need to find your FTP connection details through your hosting provider’s control panel. Once you have this information, you can use FTP software like FileZilla or SmartFTP to connect to your website using FTP. Once you are connected via FTP, you will be able to access your website directories.

FTP Panel

Inside of your main website directory, you’ll find the wp-config.php file. This is the file that needs to be edited to enable and use the WordPress Error Logs.

WP Config File

Open the wp-config.php file in your preferred text editor. If you’re using a hosting file manager, you can often edit it directly within the interface. If you are using an FTP connection, you can download the file and open it with a text editor like Notepad or VS Code.

WP Config

Enabling Debug Mode and Error Logging

Inside the wp-config.php file, look for a line that mentions the WP_DEBUG text. By default, you should see something like:

define( 'WP_DEBUG', false );

You can replace this code with a the following code to enable debugging and log errors to a file:

// Enable WordPress debug mode
define( 'WP_DEBUG', true );

// Log errors to /wp-content/debug.log
define( 'WP_DEBUG_LOG', true );

// Hide errors from displaying on the front-end
define( 'WP_DEBUG_DISPLAY', false );

@ini_set( 'display_errors', 0 );

This code tells WordPress to log errors to a debug.log file in the wp-content folder, and prevents those errors from being shown to your website visitors on the front end. Learn what each line of code does below.

  • define( ‘WP_DEBUG’, true ); This code enables WordPress’s debugging mode, allowing the logging of errors, warnings, and notices.
  • define( ‘WP_DEBUG_LOG’, true ); This tells WordPress to save all of the logged errors to a file named debug.log located in the wp-content directory.
  • define( ‘WP_DEBUG_DISPLAY’, false ); This prevents errors from being displayed on the front end of your site, ensuring that visitors won’t see error messages. (Note that this line of code is not required to enable and view the main debug log, this is related to displaying front end errors)
  • @ini_set( ‘display_errors’, 0 ); This line also prevents the displaying of front-end errors, ensuring that any PHP errors are not visible to users on your site. (Note that this line of code is not required to enable and view the main debug log, this is related to displaying front end errors)

Adjust the code values as preferred and save the file. If you’re using FTP, make sure to re-upload the file to your WordPress site, replacing the existing one for your changes to take effect.

Viewing the Error Log

Once debugging is enabled, WordPress will start recording errors, warnings, and notices in a file called debug.log, located in the wp-content folder. Navigate to the wp-content folder and look for debug.log. You can download it or open it directly in your file manager to review any errors that have been logged.

Viewing the debug log

Previously logged or triggered PHP errors will not appear in the WordPress Error Log. If you do not see a debug.log file in the wp-content folder, you will need to trigger a PHP error to create the file for the first time.

Disabling Debugging After Use

After resolving the issues, it is important to disable debug mode, as it is not recommended for use on live production websites. Keeping debug mode enabled can lead to an inflated Error Log and potentially expose sensitive information from your website.

Reopen the wp-config.php file and update the settings by setting WP_DEBUG and WP_DEBUG_LOG to false:

define( 'WP_DEBUG', false );
define( 'WP_DEBUG_LOG', false );

You can either remove or comment out the other two lines of code (if you’ve added them), depending on your preferences. If you want to retain them for future use, you can comment them out as follows:

// define( 'WP_DEBUG_DISPLAY', false );
// @ini_set( 'display_errors', 0 );

Once finished, proceed to save the file. If you are using FTP to access your website’s filebase, then ensure you reupload the wp-config.php file to your website after making these changes.

Troubleshooting the “Update Failed: Service Unavailable” error when updating Pro Kadence WP pluginsWordPress Error “Incompatible Archive”
  • Pricing
  • Products
    • Premium BundlesGet all the tools you need in one bundle
    • Kadence ThemeLightning-fast performance theme for modern websites
    • Kadence BlocksDrop in ready designs with advanced controls for pixel perfect websites
    • Kadence Shop KitCreate a more effective WooCommerce shopping experience
    • Kadence ConversionsBoost sales and build engaged audiences with popups and banners
    • Kadence InsightsEasily create A/B tests. Optimize your pages to drive higher conversions.
    • View All Products
  • AI Starter Templates
  • Blog
  • Support
    • Help CenterProduct Questions? Not sure how to do something? Start here
    • Support TicketsNeed help? We love to help our customers
    • About usCrafted with love in Missoula, Montana
    • Contact usPre Sale Questions? Need help purchasing?
Account Login
  • Features
  • Pro
  • Starter Templates
  • HelpExpand
    • Documentation
    • Facebook Group
    • Submit a Ticket
    • Feature Requests
    • Roadmap
    • Changelog