Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [http]

The tag has no usage guidance.

40
votes
3answers
934 views

Does WordPress send data about your blog to WordPress.org or Automattic?

I've recently heard someone say WordPress does send data about your blog to back home. Is that true? and if so what data is that or where in the code can I see what's exchanged?
11
votes
4answers
14k views

Hiding WordPress REST API v2 endpoints from public viewing

I would like to start using the WordPress REST API v2 to query information from my site. I've noticed that when I visit an endpoint URL directly, I can see all of the data publicly. I've also seen ...
7
votes
5answers
4k views

Chrome Version 44.0.2403.89 m is trying to force HTTPS

With the release of Chrome Version 44.0.2403.89 m, I've noticed that our site is now completely broken. All of the HTTP URLs are being redirected to HTTPS URLs, which is a problem because our site ...
7
votes
1answer
5k views

How to remove rest api link: in http headers?

i would like to remove the "link:" line added to the http headers since wordpress 4.4 here is a curl -I killcandida.org here is the output extract of the line that i would like to delete: Link: &...
6
votes
5answers
7k views

Where to get information about array fields in $_REQUEST?

I just started to learn PHP and doing things with WordPress and I am a bit confused about information in Codex. Was told that Codex got all info I required but I got stuck with it. What array fields ...
6
votes
2answers
13k views

Prevent Wordpress from sending Cache-control http header

My site sits on a server that uses Varnish as a (powerful) caching engine. Unfortunately, it seems wordpress is busting the Varnish cache by sending a cache-control http header. If I curl -I domain....
5
votes
1answer
41k views

Switch from https back to http

I recently moved my site to https, by installing a SSL-certificate on the server and updating the site address and site home in the wp-admin to use https. Due to some errors my client is experiencing ...
4
votes
2answers
202 views

Serving HTTP and HTTPS from one installation

I've got a WordPress install that is serving up content via both HTTP and HTTPS. The site URL is configured as "http://www.example.com". This works for most situations - if a person requests a page at ...
4
votes
1answer
3k views

HTTP request on localhost failing

I have a Wordpress instance on my development box with the WP REST API plugin installed. I am attempting to create my own plugin to use wp_remote_get() to communicate with my own custom PHP ...
3
votes
2answers
5k views

How do I use the 'http_request_host_is_external' filter

I'm having a really hard time trying to use the http_request_host_is_external filter. For some background, I'm trying to set up a separate server to handle private plugin and theme updates. The ...
3
votes
3answers
3k views

force http canonical tag on https pages

At present all https pages have their own canonical tags referencing https, which is incorrect, they should be referencing the http versions. e.g: https://www.example.com has the following ...
3
votes
1answer
650 views

How can I change HTTP headers only to posts of a specific category from a plugin

I have a plugin for injecting additional HTTP headers. It works fine with the following CODE: add_action( 'send_headers', 'jim_stop' ); function jim_stop() { header( 'Cache-Control: no-store, no-...
3
votes
2answers
3k views

Upgrade to SSL Breaks Admin Dashboard

I am currently running an instance of WordPress, version 4.5.3, on an Amazon EC2 server. It uses: CentOS 7 (OS) and has SELinux enabled. Server runs Apache with mod_security and mod_evasive PHP 5.6....
3
votes
1answer
699 views

wp_remote_get() not retrieving pages properly

I am using wp_remote_get() to retrieve different pages from the web. It is a news site. Most of the time, this works successfully. However, sometimes, the request returns success (code 200), but the ...
3
votes
2answers
970 views

Setting Last Modified HTTP Header on static Home Page

In response to the question asked here I find myself and this other user needing a solution to set a last modified header that contains the date and time of the most reicent post. Since we both in ...
3
votes
0answers
39 views

HTTP Header on specific page is application instead of text

Problem: clicking on (WP site that I developed) webejeeping.com/vehicles/ causes the generated php file to be downloaded instead of being rendered in the browser. MIME Type returns as "application/...
2
votes
1answer
3k views

Remove the http protocol from images

I've been banging my head on the wall trying to filter my posts to remove the http: protocol from the img src and I think I may have found a solution. Does anybody see anything wrong with this ...
2
votes
3answers
5k views

If Modified Since HTTP Header

I am trying to enable 304 If Modified Since HTTP header in my WordPress site. After doing lot of Googling I find out a site where the author said to put the following line at the very end of wordpress ...
2
votes
2answers
6k views

Programmatically log in a wordpress user

I am trying to programmatically log in a wordpress user, using the following function for that. public function auto_login( $user ) { $username = $user; if ( !...
2
votes
2answers
6k views

HTTP Error when uploading mp4 video file

This is a repeat issue, but none of the other threads have had a solution that helps me. I am using WordPress 4.7.3 running the Dani theme from Envato. When I try to upload my mp4 video file, I get an ...
2
votes
2answers
1k views

How do I troubleshoot responses with WP HTTP API?

I make a GET call to API, call is supposed to return no data: browser (and sniffer) give me 200-OK response with null text as body; wp_remote_get() gives me 200-OK response with string of binary ...
2
votes
2answers
2k views

How to get title tag of an external page with http api?

What is the best method to retrieve the title tag of an external page using the http api? The snippet below will get the body but I can't find the right documentation about how to just get the tag. ...
2
votes
1answer
897 views

problem using WP_Http with paypal nvp api

trying to convert a plugin I wrote to use wp_http instead of Curl (so it'll work on servers without curl) the plugin posts to paypal nvp api and gets back an encrypted button when I try to use the ...
2
votes
1answer
41 views

Cant Access Website - Changed HTTP to HTTPs

Was playing around with settings and changed HTTP to HTTPs. I'm now getting a message that says "Index of /". Any idea how to change it back to HTTP or login to the website?
2
votes
1answer
5k views

The resource was preloaded using link preload but not used within a few seconds

I'm using the W3 Total Cache plugin, and have set it to minify and combine CSS and JS files. I have also set it to use the HTTP2 preloading capabilities, though, when I load the site in Chrome, I'm ...
2
votes
1answer
3k views

How can I use CURLOPT_USERPWD in wp_remote_post?

I'm trying to setup a proper cURL call in WordPress so am using wp_remote_post(). However, I'm having trouble authenticating the user via wp_remote_post(). Any idea how to convert the following to be ...
2
votes
1answer
4k views

Why Better WP security plugin returns 418 I'm a Teapot “error”?

I am working on the Wordpress website and all of a sudden after deploying it on the server, I started seeing a problem where some of the pages on my website return 418 I'm a Teapot as Response status ...
2
votes
1answer
252 views

Handling the response sent from a ruby on rails application in wordpress

I am using my rails application to send data to a wordpress site. Basically if a user has wrong password, I am going to end the reverse proxy and redirect the user back to the wordpress site but I ...
2
votes
2answers
246 views

Get the final destination after WP_Http redirects (WordPress)

I'm doing some requests to an API via WordPress, and the API uses SSL connections if they're turned on in the API settings. I'd like to determine whether SSL is turned on or off without having to ask ...
2
votes
1answer
1k views

How to set status codes such as 401 and 403?

Setting a 404 in WordPress can be done quite easily using the set_404() method of WP_Query and the status_header() function. Here's an example taken from WP::handle_404(): $wp_query->set_404(); ...
2
votes
1answer
33 views

Access general settings trough wordpress files

I was reading an article about HTTPS and that you could turn on SSL and HTTPS for Wordpress quite easily. However in the article it said that you should go to Settings > General Settings within the ...
2
votes
2answers
990 views

Broken urls with http site and https wp-admin

I am currently using a wordpress installation in which all the website is intended to be shown in http while the https part is protected by a self signed certificate, distributed manually to the ...
2
votes
2answers
2k views

Getting soft 404 errors (200 status) when caching plugins are enabled

I have a blog running the latest stable version of WordPress on a dedicated virtual server with the following situation. (Replace [caching plugin] with W3 Total Cache, Hyper Cache, or Quick Cache, as ...
1
vote
1answer
5k views

Remove rel=shortlink from HTTP header

HTTP header of posts on my site looks like this: accept-ranges:bytes cache-control:public, max-age=0,public,public content-encoding:gzip content-length:5369 content-type:text/html; charset=UTF-8 date:...
1
vote
1answer
323 views

Clarity needed on usage of multiple 403 forbidden header() functions at the beginning of the plugin files

Just see the following code snippet. I have came across this in one of the plugins that I am reading now. if ( ! defined( 'ABSPATH' ) ) { header( 'Status: 403 Forbidden' ); header( 'HTTP/1.1 403 ...
1
vote
1answer
1k views

Divert http to https with WordPress on IIS

I have a WordPress site running on IIS. The site has an associated SSL Certificate. Right now I am able to access the site with http and https. How can I get my http to redirect to https? Any help ...
1
vote
2answers
107 views

Can I use HTTP POSTs? Is there a better alternative?

I am use to php development in general and I am use to getting a lot done by making a POST to a php file. However I have not seen people using $_POST in WordPress. I have seen one discussion about ...
1
vote
1answer
50 views

How To Reset Ownership And Permissions of Wp-Content Folder, In Order to Fix HTTP Error When Uploading Images to WordPress Media Library

I've noticed several articles about how to deal with the HTTP error when uploading images to the WP Media library: How to Fix HTTP Error When Uploading Images? However, I've already tried adding ...
1
vote
1answer
4k views

Can't login to Dashboard when changing site URL to HTTPS

By mistake in my WordPress settings, I changed http to https, and saved it. After it, an option come that "You have to login again", but when I tried to access my website it gives error of SSL etc, ...
1
vote
1answer
700 views

Using wp-cron in backpress - problems with wp_remote_post, fsockopen error

I'm working on a BackPress project where I need to schedule cron tasks. The cron_uri for BP is stored in options, rather than hardcoded as it is in WP core. I've tried setting the option to mysite.com/...
1
vote
1answer
39 views

Is there an equivalent to WP_Error object I can return in the case of a successful REST request?

In the case of an error at a REST endpoint I've set up, I am accustomed to returning a WP_Error object, which is convenient because I can include a code, a message, and an HTTP status into a single ...
1
vote
1answer
2k views

403 error on admin login page

I've got a problem here. I have a wordpress site and accidentally changed the http to https and I am not sure that I could change it back. What is sure that it loged me out and when I reload the admin ...
1
vote
2answers
864 views

Get full URL of images in media library including http://

media file has //example.com/wp-content/uploads/2015/08/logo.png without http:. How to change it? I need full http:// address in my posts
1
vote
2answers
667 views

How are both HTTP and HTTPS versions displaying?

We have a site that somehow has both http and https versions accessible. We want to force it all to https. When we try to set the WordPress and Site URLS to https the site ends up in a redirect loop. ...
1
vote
1answer
52 views

Is it necessary to check for `content-type` in headers?

There was an older question that I answer where someone wanted to remove the HTTP and HTTPS protocols from the URLs on their website: add_action( 'plugins_loaded', 'output_buffering' ); function ...
1
vote
2answers
96 views

Running index.php from command line & load balancer health checks

Cutting to the chase, on the command line within wordpress root folder: php index.php Should this always return a response? I'm having a technical discussion with my sysadmin about this issue. Our ...
1
vote
1answer
2k views

Failed to open stream: HTTP request failed! in \wamp\www\wordpress\wp-includes\class-http.php on line 929

I'm writing a theme and almost every time I reload a page, WordPress is giving the following error Warning: fopen(http://localhost/wordpress/wp-cron.php?doing_wp_cron=1373799734....
1
vote
1answer
4k views

Enable CORS in wordpress

I'm trying to enable CORS in wordpress and I've placed this line of code in my header.php file header("Access-Control-Allow-Origin: *"); Then I tested to see if it works via this page http://client....
1
vote
0answers
195 views

wrong media url in wordpress

Having the weirdest issue in a clean Wordpress installation. The media urls are being written with "hhttp" instead of "http". so, for example: http://dev.mysite.com/wp-content/uploads/... would ...
1
vote
0answers
92 views

WordPress 502 | Header Upstream send too big

In the past one of our clients ran in to the problem of having a certain page(while being logged in) return a 502 error (upstream sent too big header while reading response header from upstream) after ...