Debugging in WordPress There are many actions that can be taken, including checking theme and WordPress problems and plugin conflicts. WordPress debugging If you want to learn the transactions, you are in the right place!

What is WordPress Debugging?

WordPress debuggingIt is the name given to all the actions taken to find a solution to a problem that occurs in WordPress. WordPress debugging You can provide solutions to problems occurring on the site by performing the following operations.

Wordpress Debugging

WordPress debugging There are certain stages in the process. Main stages;WordPress debugging Activating the mode, checking plugin errors, plugin conflicts, checking theme and htaccess errors, wordpress errors.

Enable WordPress Debug Mode

WordPress debugging We can display PHP errors with WP_DEBUG mode. In this way, we can see which file the error is in and the error details.

Wordpress debugging To activate the mode with all its features, you can add the following codes to the top of the wp-config.php file:

define( 'WP_DEBUG', true );
define( 'WP_MEMORY_LIMIT', '512M' );

if ( WP_DEBUG === true ):
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'SCRIPT_DEBUG', true );
define( 'SAVEQUERIES', true );
else:
define( 'WP_DEBUG_LOG', false );
define( 'WP_DEBUG_DISPLAY', false );
define( 'SCRIPT_DEBUG', false );
define( 'SAVEQUERIES', false );
endif;

Once the WordPress debugging process is complete, don't forget to change the "true" value in the first line of code to "false" to avoid creating a security risk.

Note: If these codes are already in wp-config.php and their value is false, you just need to set the value of the code in the first line to "true".

Check .htaccess and wp-config.php File

Incorrect configuration of the .htaccess file can cause errors in WordPress. To check whether the .htaccess file is causing the error, let's first deactivate the file by changing its extension to .htaccess_old. Next, let's check the error we are dealing with. If the error persists, the problem is not in the .htaccess file and let's change the extension of the file back to .htaccess and move on to the next step. If the error is resolved, let's forget the old file and create a new .htaccess file. Let's access the Permalinks page from WordPress Settings on the left sidebar. Let's apply the recommended .htaccess configuration by clicking the Update Permalinks button.

Check for Plugin Conflicts

In WordPress, plugin developers test plugins in many different scenarios during the testing phase. However, there may be a conflict between one plugin used on the sites and another plugin. Even if you choose a high-quality, clean code plugin, another plugin on your site may cause the plugin you choose to return an error. However, before installing a plugin, you should be careful to use the most preferred, cleanly coded plugins, taking into account factors such as the plugin's number of downloads, reviews, comments, average score. To minimize plugin conflicts, remember to keep your plugin, theme, and WordPress version updated.

To solve the problem of plugin conflicts, deactivate all plugins and activate plugins one by one. Every time you activate a plugin, check whether the problem you are experiencing on your site persists. Whichever plugin you activate, the problem you encounter on your site, do not use that plugin again, if it is possible to update it, update it; If updating is not possible, use an alternative. Additionally, you can contribute to the development process of the plugin by contacting the plugin developer and reporting the error.

Review Theme Issues

Various problems may arise in WordPress themes after an update, incompatibility problems or after a plugin is activated/deactivated. Check your site to make sure the problem is with the theme. WordPress Twenty Twenty contact. If the critical error on your site or the error you encountered is resolved in this theme, the problem is in the theme you are using. If your license period continues, you can get free technical support by contacting the theme developer you are using or the platform that provides the theme. If the themes you use are among the free themes offered by WordPressTo the WordPress support forum You can get free support by opening a topic.

Refresh Wordpress Files

WordPress debugging Within this scope, you can undo the changes made in these files that caused the error by refreshing the core files of WordPress. From WordPress.orgDownload the latest version of WordPress. Open the zip file you downloaded and delete the wp-content folder and wp-config.php file in it. Then recompress all remaining files as a zip archive. Delete all WordPress-related files and folders except wp-config.php, .htaccess files and wp-content folder in the root directory of your site via FTP or the file manager in the hosting control panel (cpanel, plesk, directadmin, etc.). Upload the zipped WordPress files and extract the zip archive. That's all the process! You have successfully refreshed WordPress files.

Check for Version Mismatches

Updating a plugin or theme may cause version conflicts. That's why you should take a full backup of your entire site (files and database) before updating. If you updated without doing this and encountered an error, you can revert the plugin you updated to the old version with the plugin called WP Rollback to make sure that the situation you are experiencing is a version mismatch. However, this process requires the Revolution Slider etc. that comes built-in with the theme. It is not possible with paid plugins or own plugins downloaded from the theme's server.

What you need to do to downgrade a plugin in WordPress:

  • Hover over the plugins menu from the WordPress left sidebar and click on the add plugin link.
  • Type WP Rollback in the plugin search box and install the plugin.
  • Go to the WordPress Plugins page.
  • Click the rollback button next to the plugin you want to downgrade.
  • Select the new version you want the plugin to be installed from among the available versions.
  • Perform the plugin downgrade by clicking the rollback button at the bottom.

Try Changing PHP Version

Your theme or a plugin you are using may not be fully compatible with the PHP version you are currently using. You can test if the problem is a PHP version mismatch by trying to change your PHP version. Currently, the most stable version for most of the current plugins and themes in WordPress is PHP 7.4.

Increase PHP.INI Limits

The default PHP.ini values specified in shared hosting may not be sufficient for your theme or plugin. Increasing the PHP.ini values ​​of memory_limit post_max_size, upload_max_filesize, max_execution_time and max_input_time may solve some problems. To increase PHP.ini values, you can use the hosting control panel (cpanel, plesk, directadmin, etc.) offered by the provider company. If Apache or Litespeed is used on the server where the hosting you use is hosted, you can add the following codes to the bottom of the .htaccess file to increase the relevant PHP.ini values:

Increase the Memory Limit That WordPress Can Use

By default, WordPress imposes a memory limit of 40 MB. This means that a single PHP script is allowed to use up to 40 MB of RAM. In some cases, you may need to increase WordPress' memory limit to run more resource-demanding plugins like WooCommerce or bbPress. To increase the memory limit of WordPress, you can add the following code in the file named wp-config.php in the root directory of your site, just below the line where the WP_DEBUG constant is defined:

Check Database

Checking the database is one of the debugging steps. The error you are experiencing may be caused by an error in the database. To control the database, you need to master the WordPress database structure. If you are not familiar with the database structure, you can contact us using the Whatsapp button to get professional support.

WordPress Debugging

WordPress debugging service is among the services offered by Onur Özden Web Çözümleri. Our company, which is an expert in WordPress, solves errors on your site by successfully managing the WordPress debugging process. We can edit plugin or theme codes when necessary. WordPress debugging If you want to have more detailed information about our service, fill out the form below and we will contact you.