{"id":1725,"date":"2020-06-22T11:17:13","date_gmt":"2020-06-22T09:17:13","guid":{"rendered":"https:\/\/www.wp-moon.com\/?p=1725"},"modified":"2022-04-29T12:13:59","modified_gmt":"2022-04-29T10:13:59","slug":"error-curl-error-7-2","status":"publish","type":"post","link":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/","title":{"rendered":"Error: cURL error 7"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You are getting the following error &nbsp;when you go to check your WordPress performance under site health analyze :<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em><code>The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.<\/code><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>The REST API request failed due to an error.<br>Error: cURL error 7: Failed to connect to localhost port 8080: Connection refused (http_request_failed)<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You also may have errors as :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Background updates.<\/li>\n\n\n\n<li>Your site could not complete loopback request<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to resolve it<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The curl error is very explicit: It means \u201c<code><strong>Failed to connect() to host or proxy.<\/strong><\/code><code>\u201d<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You may have a <strong>firewall <\/strong>on your server or your localhost computer if <a href=\"https:\/\/www.wp-moon.com\/migrate-a-live-wordpress-to-localhost\/\" title=\"Migrate a live WordPress to localhost\">WordPress is on your localhost<\/a>. Check if port 80 and 443 are blocked, or check your personal firewall.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes, Curl will use the post 8080 instead of the classic port 80. So you also should be sure that you server uses the port 80 on your server settings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, you should look at your security plugin if you have one enabled. Try to disable it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If this curl problem causes others problems like <strong>page &amp; post updating<\/strong>, then you should follow this process:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a backup of FTP files and database<\/li>\n\n\n\n<li>Disable all plugins<\/li>\n\n\n\n<li>Switch to the default theme<\/li>\n\n\n\n<li>Clear the cache of your plugins, your browser, your hosting and your CDN if you have one.<\/li>\n\n\n\n<li>Rename your .htaccess file (by <em>.htaccess.old<\/em> for example). Go to the permalinks settings page, and click on save (it will flush permalinks).<\/li>\n\n\n\n<li>If it doesn\u2019t work, try to change your permalinks from \u201cMonth and name\u201d to \u201cPlain\u201d.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>You are getting the following error &nbsp;when you go to check your WordPress performance under site health analyze : The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages. The REST API &hellip; <a href=\"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Error: cURL error 7<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":1723,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[145],"class_list":["post-1725","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fix-errors","tag-curl-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to resolve the error cURL error 7 - WP Moon<\/title>\n<meta name=\"description\" content=\"You are getting the following error &nbsp;when you go to check your WordPress performance under site health analyze : The REST API is one way WordPress,\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to resolve the error cURL error 7 - WP Moon\" \/>\n<meta property=\"og:description\" content=\"You are getting the following error &nbsp;when you go to check your WordPress performance under site health analyze : The REST API is one way WordPress,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Moon\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpmoonwebsite\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-22T09:17:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-29T10:13:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/06\/curl.png\" \/>\n\t<meta property=\"og:image:width\" content=\"457\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Alexandre G\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@alexgaboriau\" \/>\n<meta name=\"twitter:site\" content=\"@WPMoon4\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alexandre G\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to resolve the error cURL error 7 - WP Moon","description":"You are getting the following error &nbsp;when you go to check your WordPress performance under site health analyze : The REST API is one way WordPress,","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/","og_locale":"en_US","og_type":"article","og_title":"How to resolve the error cURL error 7 - WP Moon","og_description":"You are getting the following error &nbsp;when you go to check your WordPress performance under site health analyze : The REST API is one way WordPress,","og_url":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/","og_site_name":"WP Moon","article_publisher":"https:\/\/www.facebook.com\/wpmoonwebsite","article_published_time":"2020-06-22T09:17:13+00:00","article_modified_time":"2022-04-29T10:13:59+00:00","og_image":[{"width":457,"height":200,"url":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/06\/curl.png","type":"image\/png"}],"author":"Alexandre G","twitter_card":"summary_large_image","twitter_creator":"@alexgaboriau","twitter_site":"@WPMoon4","twitter_misc":{"Written by":"Alexandre G","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/#article","isPartOf":{"@id":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/"},"author":{"name":"Alexandre G","@id":"https:\/\/www.wp-moon.com\/en\/#\/schema\/person\/72a64e6910977ec9e4b32fd8da54369d"},"headline":"Error: cURL error 7","datePublished":"2020-06-22T09:17:13+00:00","dateModified":"2022-04-29T10:13:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/"},"wordCount":212,"commentCount":0,"publisher":{"@id":"https:\/\/www.wp-moon.com\/en\/#organization"},"image":{"@id":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/06\/curl.png","keywords":["curl"],"articleSection":["Fix Errors"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/","url":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/","name":"How to resolve the error cURL error 7 - WP Moon","isPartOf":{"@id":"https:\/\/www.wp-moon.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/#primaryimage"},"image":{"@id":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/06\/curl.png","datePublished":"2020-06-22T09:17:13+00:00","dateModified":"2022-04-29T10:13:59+00:00","description":"You are getting the following error &nbsp;when you go to check your WordPress performance under site health analyze : The REST API is one way WordPress,","breadcrumb":{"@id":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/#primaryimage","url":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/06\/curl.png","contentUrl":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/06\/curl.png","width":457,"height":200},{"@type":"BreadcrumbList","@id":"https:\/\/www.wp-moon.com\/en\/error-curl-error-7-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.wp-moon.com\/en\/"},{"@type":"ListItem","position":2,"name":"Fix Errors","item":"https:\/\/www.wp-moon.com\/en\/category\/fix-errors\/"},{"@type":"ListItem","position":3,"name":"Error: cURL error 7"}]},{"@type":"WebSite","@id":"https:\/\/www.wp-moon.com\/en\/#website","url":"https:\/\/www.wp-moon.com\/en\/","name":"WP Moon","description":"","publisher":{"@id":"https:\/\/www.wp-moon.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wp-moon.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.wp-moon.com\/en\/#organization","name":"WP Moon","url":"https:\/\/www.wp-moon.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wp-moon.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/02\/logo.png","contentUrl":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2020\/02\/logo.png","width":290,"height":95,"caption":"WP Moon"},"image":{"@id":"https:\/\/www.wp-moon.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/wpmoonwebsite","https:\/\/x.com\/WPMoon4"]},{"@type":"Person","@id":"https:\/\/www.wp-moon.com\/en\/#\/schema\/person\/72a64e6910977ec9e4b32fd8da54369d","name":"Alexandre G","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2023\/09\/312419460_10229483707296045_2919774527885824513_n-100x100.jpg","url":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2023\/09\/312419460_10229483707296045_2919774527885824513_n-100x100.jpg","contentUrl":"https:\/\/www.wp-moon.com\/wp-content\/uploads\/2023\/09\/312419460_10229483707296045_2919774527885824513_n-100x100.jpg","caption":"Alexandre G"},"description":"Alexandre, Web Developer &amp; Website Editor. I've been using WordPress for over 10 years in my professional environment and on personal projects. I created WP Moon to teach you how to use this CMS, solve your problems and show you all the tricks.","sameAs":["https:\/\/www.croque-pixel.com\/","https:\/\/x.com\/alexgaboriau","https:\/\/www.youtube.com\/@wp_moon\/videos"],"url":"https:\/\/www.wp-moon.com\/en\/author\/wp-moon\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/posts\/1725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/comments?post=1725"}],"version-history":[{"count":0,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/posts\/1725\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/media\/1723"}],"wp:attachment":[{"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/media?parent=1725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/categories?post=1725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wp-moon.com\/en\/wp-json\/wp\/v2\/tags?post=1725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}