{"id":1502,"date":"2013-07-19T10:37:29","date_gmt":"2013-07-19T10:37:29","guid":{"rendered":"http:\/\/www.robertprice.co.uk\/robblog\/?p=1502"},"modified":"2013-07-19T10:37:29","modified_gmt":"2013-07-19T10:37:29","slug":"using-disqus-on-wordpress-behind-a-proxy","status":"publish","type":"post","link":"https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/","title":{"rendered":"Using Disqus On WordPress Behind A Proxy"},"content":{"rendered":"<p>I had to implement the <a href=\"http:\/\/wordpress.org\/plugins\/disqus-comment-system\/\">Disqus Comment System WordPress plugin<\/a> on a website that will be located behind an outgoing proxy server. By default the Disqus WordPress plugin does not support proxies, so it is unable to run if a proxy is blocking it&#8217;s access to the internet.<\/p>\n<p>Since WordPress 2.8, <a href=\"http:\/\/www.wordpress.org\/\">WordPress<\/a> supports proxy servers using a few defined values, <code>WP_PROXY_HOST<\/code> and <code>WP_PROXY_PORT<\/code>. I have now forked the Disqus WordPress plugin on GitHub, and added support that will look to see if these exist, and use them if they do.<\/p>\n<p>To use it, add the following to your <code>wp-config.php<\/code> file&#8230;<\/p>\n<pre class=\"lang:php decode:true \" >define('WP_PROXY_HOST', 'proxy.yourdomain.com');\ndefine('WP_PROXY_PORT', '3128');<\/pre>\n<p>Changing the values to match those of your proxy server of course.<\/p>\n<p>Now replace the <code>url.php<\/code> file in <code>wp-content\/plugins\/disqus-comment-system\/lib\/api\/disqus\/url.php<\/code> with the <a href=\"https:\/\/github.com\/disqus\/php-disqus\/blob\/master\/disqus\/url.php\"><code>url.php<\/code> found in my github repository<\/a>.<\/p>\n<p>Visit your WordPress admin panel and you should now be able to activate and configure the Disqus plugin successfully.<\/p>\n<p>I have issued a pull request for my changes to be pulled back into the main plugin, but it&#8217;s up to Disqus is they want to implement this or not.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had to implement the Disqus Comment System WordPress plugin on a website that will be located behind an outgoing proxy server. By default the Disqus WordPress plugin does not support proxies, so it is unable to run if a proxy is blocking it&#8217;s access to the internet. Since WordPress 2.8, WordPress supports proxy servers &hellip; <a href=\"https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using Disqus On WordPress Behind A Proxy&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[2],"tags":[18,25,50,51,52,77],"class_list":["post-1502","post","type-post","status-publish","format-standard","hentry","category-dev","tag-disqus","tag-http","tag-php","tag-plugin","tag-proxy","tag-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using Disqus On Wordpress Behind A Proxy - Robert Price<\/title>\n<meta name=\"description\" content=\"How to get the Disqus Wordpress plugin working on a Wordpress site that is located behind an outgoing proxy server.\" \/>\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.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Disqus On Wordpress Behind A Proxy - Robert Price\" \/>\n<meta property=\"og:description\" content=\"How to get the Disqus Wordpress plugin working on a Wordpress site that is located behind an outgoing proxy server.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/\" \/>\n<meta property=\"og:site_name\" content=\"Robert Price\" \/>\n<meta property=\"article:published_time\" content=\"2013-07-19T10:37:29+00:00\" \/>\n<meta name=\"author\" content=\"rob\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rob\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/using-disqus-on-wordpress-behind-a-proxy\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/using-disqus-on-wordpress-behind-a-proxy\\\/\"},\"author\":{\"name\":\"rob\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#\\\/schema\\\/person\\\/fac6d5b076e0e14e1fb13e15b542a6c5\"},\"headline\":\"Using Disqus On WordPress Behind A Proxy\",\"datePublished\":\"2013-07-19T10:37:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/using-disqus-on-wordpress-behind-a-proxy\\\/\"},\"wordCount\":178,\"keywords\":[\"disqus\",\"HTTP\",\"PHP\",\"plugin\",\"proxy\",\"wordpress\"],\"articleSection\":[\"Dev\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/using-disqus-on-wordpress-behind-a-proxy\\\/\",\"url\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/using-disqus-on-wordpress-behind-a-proxy\\\/\",\"name\":\"Using Disqus On Wordpress Behind A Proxy - Robert Price\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#website\"},\"datePublished\":\"2013-07-19T10:37:29+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#\\\/schema\\\/person\\\/fac6d5b076e0e14e1fb13e15b542a6c5\"},\"description\":\"How to get the Disqus Wordpress plugin working on a Wordpress site that is located behind an outgoing proxy server.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/using-disqus-on-wordpress-behind-a-proxy\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/using-disqus-on-wordpress-behind-a-proxy\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/using-disqus-on-wordpress-behind-a-proxy\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Disqus On WordPress Behind A Proxy\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#website\",\"url\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/\",\"name\":\"Robert Price\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.robertprice.co.uk\\\/robblog\\\/#\\\/schema\\\/person\\\/fac6d5b076e0e14e1fb13e15b542a6c5\",\"name\":\"rob\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g\",\"caption\":\"rob\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Disqus On Wordpress Behind A Proxy - Robert Price","description":"How to get the Disqus Wordpress plugin working on a Wordpress site that is located behind an outgoing proxy server.","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.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/","og_locale":"en_GB","og_type":"article","og_title":"Using Disqus On Wordpress Behind A Proxy - Robert Price","og_description":"How to get the Disqus Wordpress plugin working on a Wordpress site that is located behind an outgoing proxy server.","og_url":"https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/","og_site_name":"Robert Price","article_published_time":"2013-07-19T10:37:29+00:00","author":"rob","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rob","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/#article","isPartOf":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/"},"author":{"name":"rob","@id":"https:\/\/www.robertprice.co.uk\/robblog\/#\/schema\/person\/fac6d5b076e0e14e1fb13e15b542a6c5"},"headline":"Using Disqus On WordPress Behind A Proxy","datePublished":"2013-07-19T10:37:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/"},"wordCount":178,"keywords":["disqus","HTTP","PHP","plugin","proxy","wordpress"],"articleSection":["Dev"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/","url":"https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/","name":"Using Disqus On Wordpress Behind A Proxy - Robert Price","isPartOf":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/#website"},"datePublished":"2013-07-19T10:37:29+00:00","author":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/#\/schema\/person\/fac6d5b076e0e14e1fb13e15b542a6c5"},"description":"How to get the Disqus Wordpress plugin working on a Wordpress site that is located behind an outgoing proxy server.","breadcrumb":{"@id":"https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.robertprice.co.uk\/robblog\/using-disqus-on-wordpress-behind-a-proxy\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.robertprice.co.uk\/robblog\/"},{"@type":"ListItem","position":2,"name":"Using Disqus On WordPress Behind A Proxy"}]},{"@type":"WebSite","@id":"https:\/\/www.robertprice.co.uk\/robblog\/#website","url":"https:\/\/www.robertprice.co.uk\/robblog\/","name":"Robert Price","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.robertprice.co.uk\/robblog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.robertprice.co.uk\/robblog\/#\/schema\/person\/fac6d5b076e0e14e1fb13e15b542a6c5","name":"rob","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/secure.gravatar.com\/avatar\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6f0eb511179100a4e968abc70403e33686e6ab3e992e392bedd2ccac01da666c?s=96&d=mm&r=g","caption":"rob"}}]}},"_links":{"self":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/posts\/1502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/comments?post=1502"}],"version-history":[{"count":0,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/posts\/1502\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/media?parent=1502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/categories?post=1502"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.robertprice.co.uk\/robblog\/wp-json\/wp\/v2\/tags?post=1502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}