Nginx 404, 500 errors and WordPress

Warning Before you get started, I highly recommend you to create a child theme to safely modify the current theme you’re using. That way, if you need to update your theme, your changes won’t be overwritten. Modifying your current error page If your theme already has a custom error page, look for a 404.php file … Read more

WordPress 5 WP REST routes – No errors

REST API should always return JSON, so it’s output can be parsed as such. If it’ll return something that is not correct JSON, then your JS scripts may stop working. This is why there should be no errors printed in these requests – such messages break JSON response and make it hard to parse. And … Read more

REST : how do you handle the rest_no_route error?

I dug in the codex and found some interesting functions. This is how I finally did it : function api_request($api_url = null, $params=null,$method = ‘GET’){ if (!$api_url){ return new WP_Error(‘no_api_url’,”Missing API URL”); } //Create request $request = WP_REST_Request::from_url( $api_url ); //Method $request->set_method( $method ); //params switch($method){ case ‘GET’: $request->set_query_params($params); break; case ‘POST’: $request->set_body_params($params); break; } … Read more

Warning: Declaration of QuietSkin::feedback error

If anyone encounters this warning and cannot hide it with changing the line in wp-config.php from true to false , replace define(‘WP_DEBUG’, false); or define(‘WP_DEBUG’, true); with this : ini_set(‘display_errors’,’Off’); ini_set(‘error_reporting’, E_ALL ); define(‘WP_DEBUG’, false); define(‘WP_DEBUG_DISPLAY’, false); It helped me, so I hope it will help you also 😉