FeaturesWP CloudPricingEE CLIContactMy Account

Features

Team Access & User Permissions

Server Setup & Management

Site Creation & Management

Deployments & Developer Tools

Firewall Protection

Speed & Caching

Backups & Recovery

Logs & Monitoring

Create WP Cloud Sites

All Features

Read Documentation

Install

Installation Guide

FAQ

Roadmap

Explore EE CLI

Resources

Commands

Handbook

Blog

Community

Forum

EasyExperts

Tutorials

Subscribe

Github

CLEAR

Start For Free

separator Tutorials separator WordPress separator Debugging WordPress with Nginx

Topics

On this page

Better WordPress debugging…

More…

Debugging WordPress with Nginx

NGinx

To debug a WordPress setup, you just need to add the line below in wp-config.php


			define('WP_DEBUG', true);
		

Most likely, the line will be there by default. You just need to change the false flag to true.

Better WordPress debugging…

I am not a fan of the above method even though it is commonly preferred. This is because using WP_Debug outputs all error messages on screen. If you are working on Ajax-based application, debug output can mess your server-side response, and break your Ajax calls.

I will recommend using the lines below in wp-config.php


			define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);
define('SAVEQUERIES', true);
		

The first line will turn on debugging.

The second line will prevent errors from being displayed on the screen.

The third line generally logs errors in a /wp-content/debug.log file. You may not see this file on Nginx, so look out for Nginx’s error log file.  If you are following our WordPress-Nginx setup convention, then for domain example.com, you can find logged errors in /var/www/example.com/logs/error.log

Otherwise, errors might be logged to Nginx’s default error log, mostly /var/log/nginx/error.log file.

More…

404 error- Page not Found!!!

PREVIOUS


Features

Useful Links

Product

Other Products

Subscribe for curated product updates, tips, and announcements.

"*" indicates required fields

Facebook

This field is for validation purposes and should be left unchanged.

Email*

SIGN ME UP

Δ


© rtCamp, since 2009. All rights reserved.

Powered by