Support » Plugin: Yoast SEO » Error during optimization

  • Resolved hrspotato


    I tried to perform the optimazation but it showed this message: Error parsing the response to JSON. Please let me know how to resove this. Thanks!

    <!DOCTYPE html>
    <html lang="zh-TW">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="viewport" content="width=device-width">
    <meta name="robots" content="noindex, follow" />
    <title>WordPress &rsaquo; 錯誤</title>
    <style type="text/css">
    		html {
    			background: #f1f1f1;
    		body {
    			background: #fff;
    			border: 1px solid #ccd0d4;
    			color: #444;
    			font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    			margin: 2em auto;
    			padding: 1em 2em;
    			max-width: 700px;
    			-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
    			box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
    		h1 {
    			border-bottom: 1px solid #dadada;
    			clear: both;
    			color: #666;
    			font-size: 24px;
    			margin: 30px 0 0 0;
    			padding: 0;
    			padding-bottom: 7px;
    		#error-page {
    			margin-top: 50px;
    		#error-page p,
    		#error-page .wp-die-message {
    			font-size: 14px;
    			line-height: 1.5;
    			margin: 25px 0 20px;
    		#error-page code {
    			font-family: Consolas, Monaco, monospace;
    		ul li {
    			margin-bottom: 10px;
    			font-size: 14px ;
    		a {
    			color: #0073aa;
    		a:active {
    			color: #006799;
    		a:focus {
    			color: #124964;
    				0 0 0 1px #5b9dd9,
    				0 0 2px 1px rgba(30, 140, 190, 0.8);
    				0 0 0 1px #5b9dd9,
    				0 0 2px 1px rgba(30, 140, 190, 0.8);
    			outline: none;
    		.button {
    			background: #f3f5f6;
    			border: 1px solid #016087;
    			color: #016087;
    			display: inline-block;
    			text-decoration: none;
    			font-size: 13px;
    			line-height: 2;
    			height: 28px;
    			margin: 0;
    			padding: 0 10px 1px;
    			cursor: pointer;
    			-webkit-border-radius: 3px;
    			-webkit-appearance: none;
    			border-radius: 3px;
    			white-space: nowrap;
    			-webkit-box-sizing: border-box;
    			-moz-box-sizing:    border-box;
    			box-sizing:         border-box;
    			vertical-align: top;
    		.button.button-large {
    			line-height: 2.30769231;
    			min-height: 32px;
    			padding: 0 12px;
    		.button:focus {
    			background: #f1f1f1;
    		.button:focus {
    			background: #f3f5f6;
    			border-color: #007cba;
    			-webkit-box-shadow: 0 0 0 1px #007cba;
    			box-shadow: 0 0 0 1px #007cba;
    			color: #016087;
    			outline: 2px solid transparent;
    			outline-offset: 0;
    		.button:active {
    			background: #f3f5f6;
    			border-color: #7e8993;
    			-webkit-box-shadow: none;
    			box-shadow: none;
    <body id="error-page">
    <div class="wp-die-message"><p>這個網站發生嚴重錯誤。</p><p><a href="">進一步了解 WordPress 中的疑難排解方式</a></p></div></body>

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Maybellyne


    Hello @hrspotato

    I’m sorry that you could not complete the SEO data optimization. To troubleshoot further, while you’re on the SEO Data Optimization screen, can you please check if there are Javascript errors on your browser’s console? You may follow the steps here:

    Thread Starter hrspotato


    Thanks for your reply. Yes, please find the image of the errors here:

    Plugin Support Maybellyne


    Thanks for sharing the console error. The SEO data optimization feature uses the WordPress REST API to scan posts/pages for the right internal links to show. Your server returned a 500 error when accessing the REST API.

    So I recommend you contact your web host to review your server setup to determine why the REST API returns the 500 error. There may be a server setting or module that needs to be adjusted, such as mod_security. If you use security plugins, they can block access to /wp-json/yoast/ file pathway. You may need to contact them or your host provider and whitelist that URL. Once the server no longer returns the error, we would expect the SEO Data feature to load and work correctly.

    In addition, if you are using caching on your site (varnish or otherwise), you may need to adjust cache settings to remove /wp-json/yoast from the caching. If you are unsure how to do that, please contact your host provider and/or caching plugin authors.

    Do let us know how it goes.

    Plugin Support Jose Varghese


    This thread was marked resolved due to a lack of activity, but you’re always welcome to re-open the topic. Please read this post before opening a new request.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.