Skip to content

Instantly share code, notes, and snippets.

@szepeviktor
Last active December 5, 2025 16:29
Show Gist options
  • Select an option

  • Save szepeviktor/d2df7a36f61d31dad1ab9a6a5fb57106 to your computer and use it in GitHub Desktop.

Select an option

Save szepeviktor/d2df7a36f61d31dad1ab9a6a5fb57106 to your computer and use it in GitHub Desktop.
Deletion of WordPress debug tools and log files

Deletion of WordPress debug tools and log files

How to clean up after debugging.

Dummy content

  • posts, pages
  • products
  • orders
  • users

Debug and development plugins

  • /phpinfo.php
  • MU plugins
  • query-monitor
  • Translation tools
  • File managers
  • Database managers
  • Migration tools

Log files

  • wp-content/debug* files
  • error logs: find -name error_log -delete

Webserver configuration

In htaccess.

Revert WordPress settings

In wp-config.

define('WP_ENVIRONMENT_TYPE', 'production');
define('WP_DEBUG', false);
define('SCRIPT_DEBUG', false);
define('DISALLOW_FILE_EDIT', true);

Check in Query Monitor / Environment panel.

Revert PHP directives

  • max_execution_time
  • upload_max_filesize

Disable PHP profiling extension!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment